Provides Python-based tools for interacting with IDA Pro instances, enabling programmatic access to reverse engineering functions, binary analysis, and disassembly operations through IDA's Python API.
IDA-MCP
IDA-MCP (FastMCP SSE + 多实例协调器)
- 每个 IDA 实例启动一个 SSE FastMCP 服务器 (
/mcp
) - 第一个实例占用
127.0.0.1:11337
作为 协调器(coordinator),维持内存注册表并支持工具转发 - 后续实例自动注册到协调器;无需共享文件或手工配置端口
- 通过一个进程型 代理
ida_mcp_proxy.py
(MCP 客户端可用 command/args 启动)统一访问 / 聚合各实例工具
当前工具
插件内置 (server.py
)
reverse-tools (server)
check_connection
– 快速检测插件与协调器健康 (ok/count)list_instances
– 返回已注册实例原始列表list_functions
– 返回当前 IDA 数据库中全部函数 (name, start_ea, end_ea)get_function_by_name(name)
– 精确按名称获取单个函数的起止地址get_function_by_address(address)
– 通过地址(起始或内部)获取函数信息get_current_address()
– 获取当前界面光标地址get_current_function()
– 获取当前光标所在函数 (若存在)convert_number(text, size)
– 数字转换 (十进制/十六进制/二进制 ↔ 多种表示, 指定位宽)list_globals_filter(offset, count, filter?)
– 分页 + 模糊(子串)过滤的全局符号列表 (排除函数)list_globals(offset, count)
– 分页列出所有全局符号 (排除函数)list_strings_filter(offset, count, filter?)
– 分页 + 模糊过滤字符串列表list_strings(offset, count)
– 分页列出所有字符串list_local_types()
– 列出所有 Local Types (ordinal + decl 截断)decompile_function(address)
– 反编译函数 (需要 Hex-Rays)disassemble_function(start_address)
– 输出函数反汇编 (指令/注释)get_xrefs_to(address)
– 获取指向某地址的交叉引用get_xrefs_to_field(struct_name, field_name)
– 启发式获取引用结构体字段的指令位置set_comment(address, comment)
– 设置/清除地址注释 (同步到伪代码)rename_local_variable(function_address, old_name, new_name)
– 重命名函数本地变量 (Hex-Rays)rename_global_variable(old_name, new_name)
– 重命名全局变量set_global_variable_type(variable_name, new_type)
– 设置全局变量类型rename_function(function_address, new_name)
– 重命名函数set_function_prototype(function_address, prototype)
– 设置函数原型set_local_variable_type(function_address, variable_name, new_type)
– 设置局部变量类型 (Hex-Rays)declare_c_type(c_declaration)
– 解析并声明/更新一个本地类型 (struct/union/enum/typedef)get_entry_points()
– 获取所有入口点 (ordinal + 地址 + 名称)get_metadata
- 获取指定或当前实例基础元数据(hash/arch/bits 等)
dbg-tools (server)
dbg_get_registers()
– 获取所有寄存器当前值dbg_get_call_stack()
– 获取当前调用栈dbg_list_breakpoints()
– 列出所有断点dbg_start_process()
– 启动调试 (若尚未启动)dbg_exit_process()
– 结束调试进程dbg_continue_process()
– 继续运行 (Resume)dbg_run_to(address)
– 运行到指定地址dbg_set_breakpoint(address)
– 设置断点dbg_delete_breakpoint(address)
– 删除断点 (幂等)dbg_enable_breakpoint(address, enable)
– 启用/禁用断点 (不存在且启用则创建)
代理 (ida_mcp_proxy.py
)
select_instance(port?)
- 选择要使用的 IDA 实例
reverse-tools (proxy)
check_connection
- 检测是否存在活跃实例list_instances
- 返回原始实例列表list_functions
- 针对选中或自动选中实例;经协调器转发get_function_by_name(name, port?)
- 转发按名称查询函数get_function_by_address(address, port?)
- 转发按地址查询函数get_current_address(port?)
- 转发获取当前界面光标地址get_current_function(port?)
- 转发获取当前光标所在函数 (若存在)convert_number(text, size, port?)
- 转发数字转换list_globals_filter(offset, count, filter?, port?)
- 转发分页全局符号查询list_globals(offset, count, port?)
- 转发分页全局符号查询 (不含过滤)list_strings_filter(offset, count, filter?, port?)
- 转发分页字符串查询list_strings(offset, count, port?)
- 转发分页字符串查询 (不含过滤)list_local_types(port?)
- 转发列出 Local Typesdecompile_function(address, port?)
- 转发反编译函数 (需要 Hex-Rays)disassemble_function(start_address, port?)
- 转发函数反汇编get_metadata(port?)
- 获取指定或当前实例基础元数据(hash/arch/bits 等)get_xrefs_to(address, port?)
- 转发获取指向某地址的交叉引用get_xrefs_to_field(struct_name, field_name, port?)
- 转发启发式字段引用搜索set_comment(address, comment, port?)
- 转发设置地址注释rename_local_variable(function_address, old_name, new_name, port?)
- 转发重命名本地变量rename_global_variable(old_name, new_name, port?)
- 转发重命名全局变量set_global_variable_type(variable_name, new_type, port?)
- 转发设置全局变量类型rename_function(function_address, new_name, port?)
- 转发重命名函数set_function_prototype(function_address, prototype, port?)
- 转发设置函数原型set_local_variable_type(function_address, variable_name, new_type, port?)
- 转发设置局部变量类型declare_c_type(c_declaration, port?)
- 转发声明/更新本地类型get_entry_points(port?)
- 转发获取入口点列表
dbg-tools (proxy)
dbg_get_registers(port?)
- 转发获取寄存器当前值dbg_get_call_stack(port?)
- 转发获取当前调用栈dbg_list_breakpoints(port?)
- 转发列出所有断点dbg_start_process(port?)
- 转发启动调试dbg_exit_process(port?)
- 转发结束调试进程dbg_continue_process(port?)
- 转发继续运行dbg_run_to(address, port?)
- 转发运行到指定地址dbg_set_breakpoint(address, port?)
- 转发设置断点dbg_delete_breakpoint(address, port?)
- 转发删除断点dbg_enable_breakpoint(address, enable, port?)
- 转发启用/禁用断点
目录结构
启动步骤
- 复制
ida_mcp.py
+ida_mcp
文件夹到 IDA 的plugins/
。 - 打开目标二进制,等待分析完成。
- 菜单 / 快捷方式触发插件:首次启动会:
- 选择空闲端口(从 8765 起)运行 SSE 服务
http://127.0.0.1:<port>/mcp/
- 若 11337 空闲 → 启动协调器;否则向现有协调器注册
- 选择空闲端口(从 8765 起)运行 SSE 服务
- 再次触发插件 = 停止并注销实例。
代理使用
在 mcp.json
中替换 command
和 args
:
将其复制到 claude 客户端的 mcp 工具配置文件或者其他 MCP 客户端的配置文件中。
依赖
需要新增或修改的功能继续提出。欢迎增量扩展。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables interaction with multiple IDA Pro instances through MCP, allowing users to list functions, search instances, and manage reverse engineering analysis across different binary files. Supports multi-instance coordination with automatic discovery and tool forwarding between IDA Pro sessions.
Related MCP Servers
- AsecurityAlicenseAqualityAiDD MCP Server provides a secure interface for AI agents to perform file system operations and code analysis, enhancing AI-assisted development workflows across multiple programming languages.Last updated -2972PythonApache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with IDA Pro for reverse engineering and binary analysis tasks.Last updated -1263PythonMIT License
- AsecurityAlicenseAqualityMCP Server for automated reverse engineering with IDA Pro.Last updated -433,134PythonMIT License
- AsecurityAlicenseAqualityMCP server for reverse engineering that enables interaction with IDA Pro for analysis tasks such as decompilation, disassembly, and memory engagement reports.Last updated -2442PythonMIT License