MCP cover image
See in Github
2025-03-27

一个模型上下文协议(MCP)服务器,使AI助手可以与IDA Pro进行反向工程和二进制分析任务进行交互。

2

Github Watches

15

Github Forks

46

Github Stars

IDA Pro MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with IDA Pro for reverse engineering and binary analysis tasks.

IDA Pro Server MCP server

Overview

This project provides a bridge between AI assistants and IDA Pro, a popular disassembler and debugger used for reverse engineering software. It consists of three main components:

  1. IDA Pro Remote Control Plugin (ida_remote_server.py): An IDA Pro plugin that creates an HTTP server to remotely control IDA Pro functions.
  2. IDA Remote Client (idaremoteclient.ts): A TypeScript client for interacting with the IDA Pro Remote Control Server.
  3. MCP Server (index.ts): A Model Context Protocol server that exposes IDA Pro functionality to AI assistants.

Features

  • Execute Python scripts in IDA Pro from AI assistants
  • Retrieve information about binaries:
    • Strings
    • Imports
    • Exports
    • Functions
  • Advanced binary analysis capabilities:
    • Search for immediate values in instructions
    • Search for text strings in the binary
    • Search for specific byte sequences
    • Get disassembly for address ranges
  • Automate IDA Pro operations through a standardized interface
  • Secure communication between components

Prerequisites

  • IDA Pro 8.3 or later
  • Node.js 18 or later
  • TypeScript

Example usage ida_remote_server.py

curl -X POST -H "Content-Type: application/json" -d '{"script":"print(\"Script initialization...\")"}' http://127.0.0.1:9045/api/execute
{"success": true, "output": "Script initialization...\n"}

Example usage MCP Server

Roo Output

Installation

1. Install the IDA Pro Remote Control Plugin

  1. Copy ida_remote_server.py to your IDA Pro plugins directory:

    • Windows: %PROGRAMFILES%\IDA Pro\plugins
    • macOS: /Applications/IDA Pro.app/Contents/MacOS/plugins
    • Linux: /opt/idapro/plugins
  2. Start IDA Pro and open a binary file.

  3. The plugin will automatically start an HTTP server on 127.0.0.1:9045.

2. Install the MCP Server

  1. Clone this repository:

    git clone <repository-url>
    cd ida-server
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    
  4. Configure the MCP server in your AI assistant's MCP settings file:

    {
      "mcpServers": {
        "ida-pro": {
          "command": "node",
          "args": ["path/to/ida-server/dist/index.js"],
          "env": {}
        }
      }
    }
    

Usage

Once installed and configured, the MCP server provides the following tool to AI assistants:

run_ida_command

Executes an IDA Pro Python script.

Parameters:

  • scriptPath (required): Absolute path to the script file to execute
  • outputPath (optional): Absolute path to save the script's output to

Example:

# Example IDA Pro script (save as /path/to/script.py)
import idautils

# Count functions
function_count = len(list(idautils.Functions()))
print(f"Binary has {function_count} functions")

# Get the first 5 function names
functions = list(idautils.Functions())[:5]
for func_ea in functions:
    print(f"Function: {ida_name.get_ea_name(func_ea)} at {hex(func_ea)}")

# Return data
return_value = function_count

The AI assistant can then use this script with:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>run_ida_command</tool_name>
<arguments>
{
  "scriptPath": "/path/to/script.py"
}
</arguments>
</use_mcp_tool>

search_immediate_value

Searches for immediate values in the binary's instructions.

Parameters:

  • value (required): Value to search for (number or string)
  • radix (optional): Radix for number conversion (default: 16)
  • startAddress (optional): Start address for search
  • endAddress (optional): End address for search

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>search_immediate_value</tool_name>
<arguments>
{
  "value": "42",
  "radix": 10
}
</arguments>
</use_mcp_tool>

search_text

Searches for text strings in the binary.

Parameters:

  • text (required): Text to search for
  • caseSensitive (optional): Whether the search is case sensitive (default: false)
  • startAddress (optional): Start address for search
  • endAddress (optional): End address for search

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>search_text</tool_name>
<arguments>
{
  "text": "password",
  "caseSensitive": false
}
</arguments>
</use_mcp_tool>

search_byte_sequence

Searches for a specific byte sequence in the binary.

Parameters:

  • bytes (required): Byte sequence to search for (e.g., "90 90 90" for three NOPs)
  • startAddress (optional): Start address for search
  • endAddress (optional): End address for search

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>search_byte_sequence</tool_name>
<arguments>
{
  "bytes": "90 90 90"
}
</arguments>
</use_mcp_tool>

get_disassembly

Gets disassembly for an address range.

Parameters:

  • startAddress (required): Start address for disassembly
  • endAddress (optional): End address for disassembly
  • count (optional): Number of instructions to disassemble

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_disassembly</tool_name>
<arguments>
{
  "startAddress": "0x401000",
  "count": 10
}
</arguments>
</use_mcp_tool>

get_functions

Gets the list of functions from the binary.

Parameters:

  • None required

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_functions</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

get_exports

Gets the list of exports from the binary.

Parameters:

  • None required

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_exports</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

get_strings

Gets the list of strings from the binary.

Parameters:

  • None required

Example:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_strings</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

IDA Pro Remote Control API

The IDA Pro Remote Control Plugin exposes the following HTTP endpoints:

  • GET /api/info: Get plugin information
  • GET /api/strings: Get strings from the binary
  • GET /api/exports: Get exports from the binary
  • GET /api/imports: Get imports from the binary
  • GET /api/functions: Get function list
  • GET /api/search/immediate: Search for immediate values in instructions
  • GET /api/search/text: Search for text in the binary
  • GET /api/search/bytes: Search for byte sequences in the binary
  • GET /api/disassembly: Get disassembly for an address range
  • POST /api/execute: Execute Python script (JSON/Form)
  • POST /api/executebypath: Execute Python script from file path
  • POST /api/executebody: Execute Python script from raw body

Security Considerations

By default, the IDA Pro Remote Control Plugin only listens on 127.0.0.1 (localhost) for security reasons. This prevents remote access to your IDA Pro instance.

If you need to allow remote access, you can modify the DEFAULT_HOST variable in ida_remote_server.py, but be aware of the security implications.

Development

Building from Source

npm run build

Running Tests

npm test

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Florian Drechsler (@fdrechsler) fd@fdrechsler.com

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

    Reviews

    2 (1)
    Avatar
    user_6ahTW2Km
    2025-04-17

    I've been using mcp-server-idapro by fdrechsler, and it's an impressive tool for integrating IDA Pro with MCP servers. The installation process via the provided GitHub link was straightforward, and the documentation is well-organized. This server significantly optimizes my workflow, allowing seamless communication between the reverse engineering environment and the MCP server. Highly recommend for anyone seeking enhanced efficiency in their debugging tasks!