This MCP server implementation uses IDA Pro's headless mode to analyze binary files and provide function, variable management and manipulation through the Model Context Protocol (MCP). It enables interaction with IDA's analysis capabilities through a standardized API without requiring the GUI.
Clone the repository:
git clone https://github.com/cnitlrt/headless-ida-mcp-server.git
cd headless-ida-mcp-server
Install dependencies:
uv python install 3.12
uv venv --python 3.12
uv pip install -e .
Create and configure the environment file:
cp .env_example .env
Edit the .env
file with your specific configuration:
IDA_PATH=/path/to/ida/idat
PORT=8888
HOST=127.0.0.1
TRANSPORT=sse
Key settings:
IDA_PATH
: Path to IDA Pro's headless executable (idat)PORT
: Port number for the MCP serverHOST
: Host address for the MCP serverTRANSPORT
: MCP transport mode (sse
or stdio
)Launch the MCP server using the following command:
uv run headless_ida_mcp_server
You can connect to the server using an MCP client in two ways:
For debugging and testing purposes, use the MCP inspector:
npx -y @modelcontextprotocol/inspector
Add the server to your MCP configuration:
{
"mcpServers": {
"ida": {
"command": "/path/to/uv",
"args": ["--directory", "path/to/headless-ida-mcp-server", "run", "headless_ida_mcp_server"]
}
}
}
Once connected, you can utilize the MCP API to perform binary analysis tasks, manage functions and variables, and access IDA Pro's capabilities through the standardized interface.
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.
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"
]
}
}
}
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.
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.