IDA Pro MCP server

Automated reverse engineering with IDA Pro.
Back to servers
Setup instructions
Provider
Duncan Ogilvie
Release date
Mar 26, 2025
Language
Python
Stats
4.4K stars

This MCP server for IDA Pro enables powerful AI-assisted reverse engineering capabilities through the Model Context Protocol standard. It allows you to connect your IDA Pro environment to various AI assistants for more efficient binary analysis.

Installation Requirements

Before installing, ensure you have:

  • Python 3.11 or higher
    • If using IDA Pro, use idapyswitch to select the newest Python version
  • IDA Pro 8.3 or higher (version 9 recommended)
    • Note that IDA Free is not supported
  • An MCP-compatible client such as Claude, Copilot CLI, Cursor, or others

Installation

Install the IDA Pro MCP package from GitHub:

pip uninstall ida-pro-mcp
pip install https://github.com/mrexodia/ida-pro-mcp/archive/refs/heads/main.zip

Configure and install the IDA Plugin:

ida-pro-mcp --install

Important: After installation, you must completely restart both IDA Pro and your MCP client. Some clients like Claude run in the background and need to be quit from the tray icon.

Note that you need to load a binary in IDA before the plugin menu will appear.

Effective Prompt Engineering

When using large language models for reverse engineering, specific prompt engineering is important. Here's a sample prompt to start with:

Your task is to analyze a crackme in IDA Pro. You can use the MCP tools to retrieve information. In general use the following strategy:

- Inspect the decompilation and add comments with your findings
- Rename variables to more sensible names
- Change the variable and argument types if necessary (especially pointer and array types)
- Change function names to be more descriptive
- If more details are necessary, disassemble the function and add comments with your findings
- NEVER convert number bases yourself. Use the `int_convert` MCP tool if needed!
- Do not attempt brute forcing, derive any solutions purely from the disassembly and simple python scripts
- Create a report.md with your findings and steps taken at the end
- When you find a solution, prompt to user for feedback with the password you found

Using MCP Resources

MCP resources provide a structured way to access IDB state information:

Core IDB Information

  • ida://idb/metadata - Basic IDB file information
  • ida://idb/segments - Memory segments with permissions
  • ida://idb/entrypoints - Program entry points

Code Browsing

  • ida://functions - List all functions
  • ida://function/{addr} - Get details for specific function
  • ida://globals - List global variables

Data Exploration

  • ida://strings - View all strings in the binary
  • ida://imports - List imported functions
  • ida://exports - List exported functions

Core MCP Tools

Here are some of the most useful MCP functions:

Information Gathering

  • idb_meta() - Get metadata about the IDB file
  • lookup_funcs(queries) - Find functions by address or name
  • decompile(addrs) - Decompile functions at specified addresses
  • disasm(addrs) - Disassemble functions with full details
  • strings(queries) - List strings in the database

Analysis Tools

  • xrefs_to(addrs) - Get cross-references to address(es)
  • callees(addrs) - Get functions called by specified function(s)
  • callers(addrs) - Get functions that call the specified function(s)
  • int_convert(inputs) - Convert numbers between formats (decimal, hex, etc.)

Modification Operations

  • set_comments(items) - Add comments to addresses
  • patch_asm(items) - Patch assembly instructions
  • declare_type(decls) - Declare C types in the local type library
  • rename(batch) - Rename functions, globals, locals, and stack variables

Advanced Usage: SSE Transport & Headless Mode

Run an SSE server to connect to the user interface:

uv run ida-pro-mcp --transport http://127.0.0.1:8744/sse

With idalib installed, you can run a headless SSE server:

uv run idalib-mcp --host 127.0.0.1 --port 8745 path/to/executable

Improving LLM Accuracy

For better LLM analysis results:

  1. Tell the LLM to use the int_convert MCP tool for number conversions
  2. Pre-process obfuscated code by:
    • Removing string encryption
    • Resolving import hashing
    • Simplifying control flow
    • Removing anti-decompilation tricks
  3. Use tools like Lumina or FLIRT to identify library code

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "github-com-mrexodia-ida-pro-mcp" '{"command":"uv","args":["run","ida-pro-mcp","--install-plugin"],"timeout":1800}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

{
    "mcpServers": {
        "github.com/mrexodia/ida-pro-mcp": {
            "command": "uv",
            "args": [
                "run",
                "ida-pro-mcp",
                "--install-plugin"
            ],
            "timeout": 1800
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "github.com/mrexodia/ida-pro-mcp": {
            "command": "uv",
            "args": [
                "run",
                "ida-pro-mcp",
                "--install-plugin"
            ],
            "timeout": 1800
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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