MCP server for AI-assisted IDAPython scripting via idalib
Project description
ida-code
MCP server that lets AI coding agents interact with IDA Pro. Open binaries, decompile, run IDAPython, search the API docs — all through tool calls.
Built on idalib for headless in-process operation and fastmcp for the MCP transport.
Requires a licensed IDA Pro 9.2+ with idalib support.
ida-codedoes not install or replace IDA Pro — it loadsidaprofrom your existing install at startup.
Install
uv tool install ida-code
This puts the ida-code CLI on your PATH (via uv's tool dir) so MCP clients can launch it directly. Don't have uv? pip install ida-code works too.
Then point IDA_INSTALL_DIR at your IDA Pro install (the directory that contains idalib/python/):
| OS | Typical path |
|---|---|
| Linux | /opt/ida-pro-9.3 |
| macOS | /Applications/IDA Professional 9.3.app/Contents/MacOS |
| Windows | C:\Program Files\IDA Professional 9.3 |
Use with Claude Code
Add ida-code to your project's .mcp.json:
{
"mcpServers": {
"ida-code": {
"command": "ida-code",
"env": {
"IDA_INSTALL_DIR": "/opt/ida-pro-9.3"
}
}
}
}
Restart Claude Code; the server is picked up automatically. You can confirm it's wired up by asking Claude to open a binary — it should call open_database and report architecture, entry point, and load address.
For other MCP clients, run the server directly:
IDA_INSTALL_DIR=/opt/ida-pro-9.3 ida-code # stdio transport
Tools (36)
Full parameter docs live in each tool's docstring — surfaced automatically to MCP clients via tools/list.
| Domain | Tools |
|---|---|
| Database | open_database, close_database, get_database_info, list_architectures |
| Code execution | execute, execute_file |
| Navigation | list_functions, decompile, get_disassembly, get_xrefs_to, get_xrefs_from |
| Annotation | rename_function, retype_function, get_comment, set_comment, delete_comment, get_variable, set_variable |
| Structures | list_structures, get_structure, create_structure, edit_structure, delete_structure |
| Snapshots | list_snapshots, create_snapshot, restore_snapshot, delete_snapshot |
| Undo/redo | get_undo_status, perform_undo, perform_redo |
| Inventory | get_strings, get_imports, get_exports |
| Search | search_docs, search_code, get_source |
Resources & prompts
| Type | URI / name | Purpose |
|---|---|---|
| Resource | guidelines://standalone_script |
Boilerplate for standalone idalib scripts |
| Resource | guidelines://plugin |
Boilerplate for IDA plugins (plugin_t) |
| Resource | guidelines://idapython_script |
Boilerplate for IDAPython scripts run inside IDA GUI |
| Prompt | reverse_engineer |
Five-phase RE workflow (recon, triage, analysis, annotation, iteration) |
| Prompt | create_script |
Coding guidelines for a chosen target script type |
Transport modes
ida-code # stdio (default)
ida-code --http # streamable-http on 127.0.0.1:8080
ida-code --http 0.0.0.0:9090 # custom host:port
ida-code --sse # SSE on 127.0.0.1:8080
ida-code --sse :9090 # SSE on 127.0.0.1:9090
HTTP/SSE require bearer token auth. Set MCP_AUTH_TOKEN or let the server generate one (printed to stderr on startup).
Environment variables
| Variable | Default | Description |
|---|---|---|
IDA_INSTALL_DIR |
/opt/ida-pro-9.3 |
IDA Pro installation directory (must contain idalib/python/) |
LOG_LEVEL |
WARNING |
Logging verbosity (DEBUG, INFO, WARNING, ERROR) |
MCP_AUTH_TOKEN |
(auto-generated) | Bearer token for HTTP/SSE transports |
Doc and example paths are derived from IDA_INSTALL_DIR (docs/, python/, python/examples/).
Install from source
git clone https://github.com/Dil4rd/ida-code
cd ida-code
uv sync
uv run ida-code
When wiring a source checkout into .mcp.json, use uv as the command:
{
"mcpServers": {
"ida-code": {
"command": "uv",
"args": ["run", "--directory", "/path/to/ida-code", "ida-code"],
"env": { "IDA_INSTALL_DIR": "/opt/ida-pro-9.3" }
}
}
}
Note: the
fastmcpdependency is the community fastmcp package, not the officialmcpSDK. Don't installmcpby mistake.
Development
uv sync --extra dev
uv run pytest
Known issues
See KNOWN_ISSUES.md for caveats and workarounds (e.g. why we pin fastmcp<3).
The test suite covers the executor, doc/example search, comments, snapshots, structures, undo, variables, and Mach-O parsing. Tests that need idalib are skipped if it's not available.
Credits
Thanks to @p41l for ideas and for testing the tool across different LLMs.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ida_code-0.2.3.tar.gz.
File metadata
- Download URL: ida_code-0.2.3.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09df8434df901465a796c5173b6930b8f7ff52db915c2a01782e48859345c819
|
|
| MD5 |
3066eed39f09a82ff464b8ec8e1c4538
|
|
| BLAKE2b-256 |
6c8dfcf4e39193f30df3bfc568a3811a0d68450535f9b674e5c6dfe96e8bb93a
|
Provenance
The following attestation bundles were made for ida_code-0.2.3.tar.gz:
Publisher:
publish-pypi.yml on sploit00n/ida-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ida_code-0.2.3.tar.gz -
Subject digest:
09df8434df901465a796c5173b6930b8f7ff52db915c2a01782e48859345c819 - Sigstore transparency entry: 1503881457
- Sigstore integration time:
-
Permalink:
sploit00n/ida-code@013530cddba55cc0dc6ccafe0cea4af56c28782a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sploit00n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@013530cddba55cc0dc6ccafe0cea4af56c28782a -
Trigger Event:
push
-
Statement type:
File details
Details for the file ida_code-0.2.3-py3-none-any.whl.
File metadata
- Download URL: ida_code-0.2.3-py3-none-any.whl
- Upload date:
- Size: 50.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65eaab5532b86e0f699f95a1b83a425732050cda9a4898154e2af2768b7b17b5
|
|
| MD5 |
e83b00dce4156e4cf916245ef81b997b
|
|
| BLAKE2b-256 |
79923a44487f28c3fd3219b69c683428cba338cb3d54b86bf2bd291c6ba85b36
|
Provenance
The following attestation bundles were made for ida_code-0.2.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on sploit00n/ida-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ida_code-0.2.3-py3-none-any.whl -
Subject digest:
65eaab5532b86e0f699f95a1b83a425732050cda9a4898154e2af2768b7b17b5 - Sigstore transparency entry: 1503881719
- Sigstore integration time:
-
Permalink:
sploit00n/ida-code@013530cddba55cc0dc6ccafe0cea4af56c28782a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sploit00n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@013530cddba55cc0dc6ccafe0cea4af56c28782a -
Trigger Event:
push
-
Statement type: