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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.