ida-mcp-server

shoff/ida-mcp-server

3.2

If you are the rightful owner of ida-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MCP-IDA is a modern, async MCP server and IDA Pro plugin designed for collaborative reverse engineering.

Tools
4
Resources
0
Prompts
0

MCP-IDA: Reverse Engineering Helper

Python MCP Docker

A modern, async MCP server and IDA Pro plugin for collaborative reverse engineering. The server communicates over the Message Control Protocol instead of HTTP.

πŸš€ Features


  • MCP server for async, high-performance communication
  • IDA Pro plugin for exposing binary analysis data over a socket
  • Docker-ready for easy deployment
  • Async Python client for robust communication with IDA
  • MCP tools for functions, segments, and strings
  • Environment variable configuration for host/port

πŸ—‚οΈ Project Structure

ida-mcp/
β”œβ”€β”€ .env
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ ida_mcp_plugin.py         # IDA Pro plugin (copy to <IDA>/plugins)
β”œβ”€β”€ mcp_server/               # MCP server code
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py               # MCP server entrypoint
β”‚   └── ida_client.py         # Async client for IDA plugin
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ dev_logs/                 # (empty or logs)
└── project-information.md    # (custom project notes)

⚑ Quickstart

1. Prerequisites

  • Python 3.11+
  • IDA Pro (for plugin)
  • Docker (optional, for containerized deployment)

2. Clone the Repository

git clone https://github.com/yourusername/ida-mcp.git
cd ida-mcp

3. Install Dependencies

python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -r requirements.txt

4. Run the MCP Server

python -m mcp_server --help

To start the server with the default settings:

python -m mcp_server -v

Or with Docker:

docker-compose up --build

This compose file keeps standard input open so the server won't immediately exit.

5. Install the IDA Plugin

  • Copy ida_mcp_plugin.py to your <IDA>/plugins directory.
  • Restart IDA, or use Plugins > MCP Listener in the IDA UI.

πŸ”Œ Environment Variables

  • IDA_HOST (default: host.docker.internal for Docker, 127.0.0.1 for local)
  • IDA_PORT (default: 8888)

Set these in your .env file or as environment variables.


🧩 MCP Tools

The server exposes the following tools which can be invoked via an MCP client:

  • list_functions β€” List all functions in the binary
  • get_function β€” Get details for a specific function
  • list_segments β€” List all memory segments
  • list_strings β€” List all strings (with optional minlen argument)

🐳 Docker Usage

Build and run everything with:

docker-compose up --build

The included compose file sets stdin_open so the server keeps running.

To build and run the container manually without compose:

docker build -t mcp-server:latest .
docker run -i mcp-server:latest

This will:

  • Build the MCP server image
  • Use environment variables for IDA host/port

πŸ§‘β€πŸ’» Development

  • All server code is in mcp_server/
  • The IDA plugin is standalone Python, compatible with IDA scripting
  • Logging and troubleshooting: check dev_logs/ (if used)

πŸ›‘οΈ Security

  • The IDA plugin listens on all interfaces by default (0.0.0.0:8888)
  • For production, restrict access via firewall or set HOST to 127.0.0.1
  • No authentication is enabled by defaultβ€”consider a reverse proxy for public deployments

πŸ“ Example Usage

Interact with the server using the mcp Python package:

from mcp.client import Client

client = Client()
print(client.call_tool("list_functions"))

πŸ§ͺ Testing

  • Manual: connect with an MCP client and invoke the tools
  • Automated: Add tests in a tests/ directory (not present by default)

🀝 Contributing

  1. Fork this repo
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit and push (git commit -m "feat: add new feature")
  4. Open a Pull Request

πŸ“„ License

MIT License. See .


πŸ™ Acknowledgements


Built with ❀️ for the reverse engineering community.