MCP HubMCP Hub
mrexodia

ida-pro-mcp

by: mrexodia

MCP Server for IDA Pro

1445created 25/03/2025
Visit
IDA
Plugin

📌Overview

Purpose: The IDA Pro MCP aims to simplify the process of reverse engineering by providing a user-friendly MCP (Model Context Protocol) server for the IDA Pro environment.

Overview: This MCP server enables seamless interaction with IDA Pro, facilitating various reverse engineering tasks through a straightforward plugin that requires minimal setup. Users can easily access and manipulate functions within the IDA database, improving the overall reversing workflow.

Key Features:

  • Function Retrieval: Methods like get_function_by_name(name) and get_function_by_address(address) allow users to quickly locate specific functions, enhancing navigation and analysis efficiency.

  • Decompilation and Disassembly: Features such as decompile_function(address) and disassemble_function(address) provide users with the ability to obtain high-level representation and assembly code respectively, aiding in detailed examination of code behavior.

  • Manipulation Tools: Users can rename variables and functions, set prototypes, and adjust comments directly within IDA's pseudocode and disassembly through functions like rename_function(function_address, new_name), set_decompiler_comment(address, comment), and set_disassembly_comment(address, comment), thereby streamlining the analysis process.

  • Lightweight Setup: Requires only copying a single file (mcp-plugin.py) to the IDA plugin directory without additional dependencies, making installation straightforward.

  • Extensibility: New functionalities can be added easily, allowing users to adapt the plugin to their specific needs with minimal overhead, encouraging rapid development and innovation in reverse engineering tools.


IDA Pro MCP

A simple MCP Server to facilitate reverse engineering in IDA Pro.

Available Functionality

  • get_function_by_name(name): Get a function by its name.
  • get_function_by_address(address): Get a function by its address.
  • get_current_address(): Get the currently selected address.
  • get_current_function(): Get the currently selected function.
  • list_functions(): List all functions in the database.
  • decompile_function(address): Decompile a function at a given address.
  • disassemble_function(address): Get assembly code for a function.
  • set_decompiler_comment(address, comment): Set a comment in function pseudocode.
  • set_disassembly_comment(address, comment): Set a comment in function disassembly.
  • rename_local_variable(function_address, old_name, new_name): Rename a local variable in a function.
  • rename_function(function_address, new_name): Rename a function.
  • set_function_prototype(function_address, prototype): Set a function's prototype.
  • set_local_variable_type(function_address, variable_name, new_type): Set a local variable's type.
  • get_metadata(): Get metadata about the current IDB.

Why I Created This MCP Server

  1. The plugin installation is straightforward: just copy mcp-plugin.py to the IDA plugins folder.
  2. Other plugins have architecture that complicates adding new functionality quickly.
  3. Learning new technologies is enjoyable!

Installation Instructions

IDA Pro Installation

  1. Copy mcp-plugin.py to your plugins folder (%appdata%\Hex-Rays\IDA Pro\plugins on Windows).
  2. Open an IDB and navigate to Edit -> Plugins -> MCP to start the server.

MCP Server Installation (Cline/Claude)

  1. Install uv globally:
    • Windows: pip install uv
    • Linux/Mac: curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Clone this repository (e.g., to C:\MCP\ida-pro-mcp).
  3. Access the Cline MCP Servers configuration.
  4. Click on the Installed tab and then Configure MCP Servers to edit cline_mcp_settings.json.
  5. Add the ida-pro-mcp server:
{
  "mcpServers": {
    "github.com/mrexodia/ida-pro-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "c:\\MCP\\ida-pro-mcp",
        "run",
        "server.py"
      ],
      "timeout": 600
    }
  }
}

Development

Run the development server with:

uv run fastmcp dev server.py

This opens a web interface at http://localhost:5173 to interact with the MCP tools.

To add new features, simply include a new @jsonrpc function in mcp-plugin.py and it will be available in the MCP server.

Tips for Enhancing LLM Accuracy

Large Language Models (LLMs) can struggle with complex calculations or create inaccuracies ("hallucinations"). Here are some resources to improve precision: