IDA Pro MCP server

Provides a bridge to IDA Pro for reverse engineering and binary analysis tasks through a remote control plugin that enables script execution, string/function analysis, and disassembly via HTTP endpoints
Back to servers
Provider
Florian Drechsler
Release date
Mar 25, 2025
Language
TypeScript
Stats
54 stars

The IDA Pro MCP Server provides a bridge between AI assistants and IDA Pro, enabling automated reverse engineering and binary analysis tasks through a standardized interface. It acts as a gateway that allows AI models to interact with IDA Pro's powerful analysis capabilities.

Installation

Setting Up 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.

Installing the MCP Server

  1. Clone the 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

Available MCP Tools

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

You can directly interact with the IDA Pro Remote Control Plugin using HTTP requests:

  • 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

Example direct API usage:

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

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.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later