frida-mcp
Exposes Frida dynamic instrumentation capabilities to AI assistants, enabling process management, memory access, and function hooking through structured tool calls.
README
Frida MCP Server
A Model Context Protocol (MCP) server that exposes Frida dynamic instrumentation capabilities to AI assistants like Claude Code, Claude Desktop, and any other MCP-compatible client.
What this enables: Your AI assistant can list processes, attach to them, hook functions, read memory, and execute arbitrary instrumentation scripts — all through structured tool calls, without writing boilerplate.
Features
- Process management — list, attach, detach from running processes
- Module introspection — enumerate loaded DLLs/modules, find exported function addresses
- Memory access — read raw memory and strings (UTF-8, UTF-16, ANSI) from the target process
- Function hooking — intercept function calls, trace arguments and return values
- Batch hooking — hook multiple functions simultaneously
- Arbitrary scripting — execute custom Frida JavaScript in the target process
Installation
Prerequisites
- Python 3.10+
- Frida tools installed on your system
- (Windows) A Frida server running on the target device if targeting mobile/remote
Install from source
git clone https://github.com/cengziyang22-bit/frida-mcp.git
cd frida-mcp
pip install -e .
Quick install via pip
pip install git+https://github.com/cengziyang22-bit/frida-mcp.git
Configuration
Claude Code
Add to ~/.mcp.json:
{
"mcpServers": {
"frida": {
"type": "stdio",
"command": "python",
"args": ["-m", "frida_mcp.server"]
}
}
}
Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"frida": {
"command": "python",
"args": ["-m", "frida_mcp.server"]
}
}
}
Tools Reference
| Tool | Description |
|---|---|
list_processes |
List running processes visible to Frida |
attach_process |
Attach to a process by name or PID |
detach_process |
Detach from the current process |
get_process_info |
Get info about the attached process |
list_modules |
List loaded modules/DLLs in the target process |
find_export |
Find the address of an exported function |
read_memory |
Read raw bytes from process memory |
read_string |
Read a string from process memory |
hook_function |
Hook a function and watch its calls |
hook_functions_batch |
Hook multiple functions simultaneously |
run_script |
Execute arbitrary Frida JavaScript in the target |
Usage Examples
1. Find and attach to a process
attach_process("notepad.exe")
2. List loaded modules
list_modules(filter_name="kernel32")
3. Hook a Windows API function
hook_function("MessageBoxW", duration_seconds=10)
Then trigger a message box in the target app — all calls are captured with timestamps and arguments.
4. Read a string from memory
read_string("0x7ffb5fa80000", encoding="utf16")
5. Run a custom Frida script
run_script("""
Process.enumerateModules().filter(m => m.name.includes('sqlite'))
.forEach(m => send(m.name + ' @ ' + m.base));
""")
6. Batch hook multiple functions
hook_functions_batch("WriteFile,ReadFile,CreateFileW", duration_seconds=5)
Architecture
frida-mcp/
├── frida_mcp/
│ ├── __init__.py
│ └── server.py # MCP server with all 11 tools
├── pyproject.toml # Project metadata and dependencies
├── README.md
└── LICENSE
The server uses FastMCP over stdio transport. All tool state (attached process, hook queues) is session-scoped and thread-safe.
Frida Version Compatibility
Built and tested against Frida 17.x. Key API changes from Frida 16.x:
| Old (Frida 16) | New (Frida 17) |
|---|---|
Module.enumerateModules() |
Process.enumerateModules() |
Module.getGlobalExportByName(mod, name) |
Module.getGlobalExportByName(name) |
ptr("0x...") |
new NativePointer(...) |
Security Considerations
- Frida requires elevated privileges to attach to processes on most platforms
- Hooking and memory manipulation can crash the target process
- Only attach to processes you own or have explicit permission to instrument
- The
run_scripttool executes arbitrary JavaScript in the target process — use with caution
License
MIT © 2025
Acknowledgments
- Frida — the dynamic instrumentation toolkit that makes this possible
- FastMCP — elegant Python MCP framework
- Model Context Protocol — Anthropic's open standard for AI-tool integration
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。