Skip to main content
Glama

IDA-MCP

by jelasin

IDA-MCP

readme-en

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 Types
  • decompile_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/ ida_mcp.py # 插件入口:启动/停止 SSE server + 注册协调器 ida_mcp/ server.py # FastMCP server 定义 (最小工具集) registry.py # 协调器实现 / 多实例注册 & /call 转发 __init__.py # 包初始化, 导出 create_mcp_server 并说明子模块结构 proxy/ ida_mcp_proxy.py # 进程型代理(附加 MCP server, 通过协调器 /call 转发) mcp.json # MCP 客户端配置 (含 proxy / sse) README.md requirements.txt # fastmcp 依赖(若外部环境需要)

启动步骤

  1. 复制 ida_mcp.py + ida_mcp 文件夹到 IDA 的 plugins/
  2. 打开目标二进制,等待分析完成。
  3. 菜单 / 快捷方式触发插件:首次启动会:
    • 选择空闲端口(从 8765 起)运行 SSE 服务 http://127.0.0.1:<port>/mcp/
    • 若 11337 空闲 → 启动协调器;否则向现有协调器注册
  4. 再次触发插件 = 停止并注销实例。

代理使用

mcp.json 中替换 commandargs

{ "mcpServers": { "ida-mcp-proxy": { "command": "path of python", "args": ["path of ida_mcp_proxy.py"], "env": {}, "description": "Process MCP proxy that forwards to running IDA SSE server." } }, "version": "1.0.0", "description": "Configuration for IDA-MCP SSE server" }

将其复制到 claude 客户端的 mcp 工具配置文件或者其他 MCP 客户端的配置文件中。

依赖

python -m pip install -r requirements.txt

需要新增或修改的功能继续提出。欢迎增量扩展。

-
security - not tested
A
license - permissive license
-
quality - not tested

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

  • A
    security
    A
    license
    A
    quality
    AiDD 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 -
    29
    72
    Python
    Apache 2.0
    • Apple
    • Linux
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that enables AI assistants to interact with IDA Pro for reverse engineering and binary analysis tasks.
    Last updated -
    12
    63
    Python
    MIT License
    • Linux
    • Apple
  • A
    security
    A
    license
    A
    quality
    MCP Server for automated reverse engineering with IDA Pro.
    Last updated -
    43
    3,134
    Python
    MIT License
    • Linux
    • Apple
  • A
    security
    A
    license
    A
    quality
    MCP server for reverse engineering that enables interaction with IDA Pro for analysis tasks such as decompilation, disassembly, and memory engagement reports.
    Last updated -
    24
    42
    Python
    MIT License

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jelasin/IDA-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server