frida-mcp
An MCP server that exposes dynamic binary instrumentation, memory editing, pointer scanning, and scripting capabilities to AI agents, enabling real-time process inspection and modification.
README
Dynamic Instrumenter & Memory Editor MCP Server
A Model Context Protocol (MCP) server that exposes advanced dynamic binary instrumentation, dynamic memory editing, pointer scanning, and automated scripting capabilities (JavaScript & Lua) to AI Agents and IDEs.
This server integrates seamlessly with advanced AI systems such as Antigravity, Cursor, Windsurf, and Claude Desktop, allowing them to interactively inspect processes, search memory spaces, freeze variables, and hot-patch code in real-time.
Capabilities
- Memory Editing & Values Search:
- Scan target process memory for standard types:
byte,word,dword,qword,float,double,hexpatterns, and strings (utf8/utf16). - XOR encrypted search support with masks.
- Scan region constraints: Anonymous maps, Stack, Heap, Dalvik, Code segments.
- Fuzzy Search: Refine relative scans (
exact,changed,unchanged,increased,decreased,greater,less).
- Scan target process memory for standard types:
- Group & Nearby Scans:
- Locate multiple values separated by distance thresholds (e.g.
100;50;99).
- Locate multiple values separated by distance thresholds (e.g.
- Pointer Scanning:
- Walk pointer paths to identify reference patterns pointing to target values.
- Dynamic Variables Freezing:
- Lock variables in memory by writing values repeatedly on a 100ms interval loop.
- Inline Binary Patching:
- Hot-patch executable code instructions (like NOP-ing checks) in-memory using
Memory.patchCode().
- Hot-patch executable code instructions (like NOP-ing checks) in-memory using
- Script Run Engines:
- Exposes an embedded JavaScript script runner containing a simulated Game Guardian
ggglobal class. - Supports executing standard Lua scripts on the host, bridged to the instrumentation agent.
- Exposes an embedded JavaScript script runner containing a simulated Game Guardian
Installation
Prerequisites
- Python 3.8 or later
- Target device must have
frida-serverrunning (or local process debugging enabled)
Setup
Install the package in editable mode:
git clone <your-repository-url>
cd frida-mcp
pip install -e .
To run Lua automation scripts, install with the optional Lua VM package:
pip install -e ".[lua]"
AI IDE and Client Integration
This server is designed to work with any MCP-compliant AI client. Below are configuration details for popular platforms:
1. Antigravity IDE
Add the server configuration under your MCP settings panel:
- Type:
command - Name:
frida-mcp - Command:
frida-mcp
2. Cursor
In Cursor, navigate to Settings -> Features -> MCP and add a new agent:
- Name:
frida-mcp - Type:
command - Command:
frida-mcp
3. Windsurf
In Windsurf, configure your global or workspace mcp_config.json:
{
"mcpServers": {
"frida-mcp": {
"command": "frida-mcp"
}
}
}
4. Claude Desktop
Add the following to your configuration file (Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"frida-mcp": {
"command": "frida-mcp"
}
}
}
Exposed MCP Tools
Process Control
list_devices: View connected USB/local/remote devices.list_processes: Enumerate running processes.locate_process: Find process PIDs matching a search name.spawn_program/resume_process/terminate_process: Process lifecycle tools.
Memory & Search
open_session: Attach to a process and inject the instrumentation engine.list_sessions: View all open memory sessions (browser tab manager).close_session: Detach and clean up.mem_search: Initial memory scan by type.mem_refine: Filter scan list by value changes.mem_pointer_search: Find pointer addresses pointing to search targets.mem_group_search: Search for multiple values close to one another.mem_get_candidates: Retrieve values of matching addresses.mem_write/mem_write_all: Write values to single or all candidate results.mem_freeze/mem_unfreeze: Lock/unlock variables at specific addresses.mem_patch_code: Patch binary opcodes at runtime.mem_dump_range: Extract raw memory ranges as bytes.mem_find_translated_library: Locate base address of translated ARM libraries in memory maps (such as Houdini translation environments).mem_dump_metadata: Pull decrypted global-metadata.dat directly from target app cache directories to host path.
Quick Operations (Token Reduction)
mem_quick_search_and_edit: Search for a value and edit all occurrences in a single invocation.mem_quick_patch_offsets: Apply multiple binary instruction patches simultaneously in a single call.mem_quick_freeze_list: Freeze a list of multiple memory addresses in a single call.
Persistent Offsets (Saved List)
saved_list_load: Load saved offset database.saved_list_add: Save name, address, and type to local persistent config.saved_list_remove: Remove address from database.
Custom Automation Scripts
execute_js_script: Run JavaScript scripts (with globalggenvironment).execute_lua_script: Run Lua automation scripts.
Scripting Environment Helpers
Scripts have access to the simulated gg scripting object:
gg.searchNumber(value, type, regions, xorKey)gg.refineNumber(value, mode)gg.getResults(limit)gg.editAll(value, type)gg.setValues(items)gg.freeze(address, value, type)gg.unfreeze(address)
Example Script (JS)
// Search for variable value
var count = gg.searchNumber(100, "dword");
if (count > 0) {
// Modify matches
gg.editAll(9999, "dword");
}
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。