ida-mcp-server

shoff/ida-mcp-server

3.1

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 dayong@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.