IDA Pro MCP server

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

The IDA Pro MCP server provides a powerful interface between IDA Pro and large language models, enabling AI-assisted reverse engineering through the Model Context Protocol.

Installation

Prerequisites

  • Python 3.11 or higher (use idapyswitch to select the newest Python version)
  • IDA Pro 8.3 or higher (version 9 recommended)
  • A compatible MCP client such as Cline, Roo Code, Claude, Cursor, or VSCode Agent Mode

Standard Installation

Install or upgrade the IDA Pro MCP package:

pip install --upgrade git+https://github.com/mrexodia/ida-pro-mcp

Configure the MCP servers and install the IDA Plugin:

ida-pro-mcp --install

Important: Completely restart IDA, Visual Studio Code, Claude (quit from tray icon), or any other MCP client for the installation to take effect.

Manual Installation

If you prefer a manual installation approach:

  1. Install uv globally:
    • Windows: pip install uv
    • Linux/Mac: curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Clone the repository (e.g., to C:\MCP\ida-pro-mcp)
  3. Configure your MCP client with the server details

For the IDA plugin, copy src/ida_pro_mcp/mcp-plugin.py to your plugins folder (typically %appdata%\Hex-Rays\IDA Pro\plugins on Windows).

Using the MCP Server

The IDA Pro MCP server provides numerous functions to interact with IDA Pro databases:

Basic Information

  • Check connection: check_connection
  • Get database metadata: get_metadata()
  • Get current address: get_current_address()
  • Get current function: get_current_function()

Function and Data Analysis

  • Get function by name: get_function_by_name(name)
  • Get function by address: get_function_by_address(address)
  • List functions: list_functions(offset, count)
  • Decompile function: decompile_function(address)
  • Disassemble function: disassemble_function(start_address)
  • Get cross-references: get_xrefs_to(address)
  • Get entry points: get_entry_points()

String Analysis

  • List strings: list_strings(offset, count)
  • Search strings: search_strings(pattern, offset, count)

Number Conversion

  • Convert numbers: convert_number(text, size)

Code Modification

  • Set comment: set_comment(address, comment)
  • Rename function: rename_function(function_address, new_name)
  • Set function prototype: set_function_prototype(function_address, prototype)
  • Declare C type: declare_c_type(c_declaration)
  • Rename local variable: rename_local_variable(function_address, old_name, new_name)
  • Set local variable type: set_local_variable_type(function_address, variable_name, new_type)
  • Rename global variable: rename_global_variable(old_name, new_name)
  • Set global variable type: set_global_variable_type(variable_name, new_type)

Effective Prompting Strategies

When using LLMs with this MCP server, you'll get better results with careful prompting. Here's a starting template:

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 convert_number 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

Tips for Better Results

  • Always instruct the LLM to use the convert_number function rather than performing number conversions itself
  • Consider using supplementary tools like math-mcp for complex calculations
  • LLMs struggle with obfuscated code; pre-process binaries to remove:
    • String encryption
    • Import hashing
    • Control flow flattening
    • Code encryption
    • Anti-decompilation tricks
  • Use Lumina or FLIRT to identify library code and C++ STL functions

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