MCP server for executing IDAPython scripts in IDA Pro with multi-instance support
Project description
IDA Script MCP
🇺🇸 English Version
Execute IDAPython scripts in IDA Pro through AI assistants like Claude.
Features
- 🤖 AI-Powered Analysis - Let Claude or other AI assistants analyze binaries directly in IDA Pro
- 🔄 Multi-Instance Support - Analyze multiple binaries simultaneously across different IDA instances
- 🚀 Easy Integration - One-command installation for both IDA plugin and MCP client configuration
- 🔧 Full IDA API Access - Complete access to all IDA modules (idaapi, idc, idautils, ida_hexrays, etc.)
- 📊 Output Capture - Capture stdout/stderr and return values from executed code
Requirements
- IDA Pro 8.3+ (IDA Free not supported)
- Python 3.11+
- Windows / macOS / Linux
Installation
Quick Start (Recommended)
# Install package and configure Claude Desktop
pip install ida-script-mcp
ida-script-mcp-install install claude
Advanced Options
# Install plugin only
ida-script-mcp-install install
# Configure multiple MCP clients
ida-script-mcp-install install claude,cursor,vscode
# Use project-level configuration
ida-script-mcp-install install --project claude
# List available MCP clients
ida-script-mcp-install --list-clients
From Source
git clone https://github.com/SuZiXunYue/ida-script-mcp.git
cd ida-script-mcp
pip install -e .
ida-script-mcp-install install
Usage
1. Start IDA Plugin
- Open IDA Pro and load a binary file
- Go to Edit → Plugins → IDA-Script-MCP (or press
Ctrl+Alt+S) - Plugin will start and show:
[IDA-Script-MCP] Server started at http://127.0.0.1:13338 [IDA-Script-MCP] Instance ID: 12345_crackme.exe
2. Use with AI Assistant
The MCP server provides these tools to your AI assistant:
list_ida_instances- List all running IDA instancesexecute_idapython- Execute Python code in IDA Procheck_ida_connection- Check connection statusget_ida_database_info- Get database information
3. Example Commands for AI
Ask your AI assistant to:
- "List all functions in this binary"
- "Decompile the main function"
- "Find all xrefs to address 0x401000"
- "Rename function at 0x401000 to my_function"
- "Show all strings in the binary"
Supported MCP Clients
| Client | Configuration File |
|---|---|
| Claude Desktop | claude_desktop_config.json |
| Cursor | .cursor/mcp.json |
| Claude Code | .claude.json |
| VS Code | settings.json |
| Windsurf | mcp_config.json |
Troubleshooting
Plugin not found in IDA
- Ensure plugin file is in IDA's plugins directory
- Check IDA output window for errors
Connection refused
- Verify IDA Pro is running with a database loaded
- Confirm plugin is started (Edit → Plugins → IDA-Script-MCP)
Command not found
pip show ida-script-mcp
which ida-script-mcp-install
Security Note
⚠️ This plugin allows arbitrary Python code execution in IDA Pro:
- Use only with trusted AI assistants
- Plugin binds to
127.0.0.1by default (localhost only) - Never expose the HTTP port to public networks
License
MIT License
🇨🇳 中文版本
通过 Claude 等 AI 助手在 IDA Pro 中执行 IDAPython 脚本。
特性
- 🤖 AI 驱动分析 - 让 Claude 或其他 AI 助手直接在 IDA Pro 中分析二进制文件
- 🔄 多实例支持 - 同时分析多个二进制文件,跨不同 IDA 实例
- 🚀 简单集成 - 一条命令完成 IDA 插件和 MCP 客户端配置
- 🔧 完整 IDA API 访问 - 完全访问所有 IDA 模块(idaapi、idc、idautils、ida_hexrays 等)
- 📊 输出捕获 - 捕获执行代码的标准输出/错误和返回值
系统要求
- IDA Pro 8.3+(不支持 IDA Free)
- Python 3.11+
- Windows / macOS / Linux
安装
快速开始(推荐)
# 安装包并配置 Claude Desktop
pip install ida-script-mcp
ida-script-mcp-install install claude
高级选项
# 仅安装插件
ida-script-mcp-install install
# 配置多个 MCP 客户端
ida-script-mcp-install install claude,cursor,vscode
# 使用项目级配置
ida-script-mcp-install install --project claude
# 列出可用的 MCP 客户端
ida-script-mcp-install --list-clients
从源码安装
git clone https://github.com/SuZiXunYue/ida-script-mcp.git
cd ida-script-mcp
pip install -e .
ida-script-mcp-install install
使用方法
1. 启动 IDA 插件
- 打开 IDA Pro 并加载二进制文件
- 进入 Edit → Plugins → IDA-Script-MCP(或按
Ctrl+Alt+S) - 插件启动后会显示:
[IDA-Script-MCP] Server started at http://127.0.0.1:13338 [IDA-Script-MCP] Instance ID: 12345_crackme.exe
2. 使用 AI 助手
MCP 服务器为 AI 助手提供以下工具:
list_ida_instances- 列出所有运行中的 IDA 实例execute_idapython- 在 IDA Pro 中执行 Python 代码check_ida_connection- 检查连接状态get_ida_database_info- 获取数据库信息
3. 示例命令
让 AI 助手执行:
- "列出此二进制文件中的所有函数"
- "反编译 main 函数"
- "查找地址 0x401000 的所有交叉引用"
- "将地址 0x401000 的函数重命名为 my_function"
- "显示二进制文件中的所有字符串"
支持的 MCP 客户端
| 客户端 | 配置文件 |
|---|---|
| Claude Desktop | claude_desktop_config.json |
| Cursor | .cursor/mcp.json |
| Claude Code | .claude.json |
| VS Code | settings.json |
| Windsurf | mcp_config.json |
故障排除
在 IDA 中找不到插件
- 确认插件文件在 IDA 的 plugins 目录中
- 检查 IDA 输出窗口的错误信息
连接被拒绝
- 确保 IDA Pro 正在运行且已加载数据库
- 确认插件已启动(Edit → Plugins → IDA-Script-MCP)
找不到命令
pip show ida-script-mcp
which ida-script-mcp-install
安全提示
⚠️ 此插件允许在 IDA Pro 中执行任意 Python 代码:
- 仅与可信的 AI 助手一起使用
- 插件默认绑定到
127.0.0.1(仅本地访问) - 切勿将 HTTP 端口暴露到公网
许可证
MIT 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_script_mcp-1.0.2.tar.gz.
File metadata
- Download URL: ida_script_mcp-1.0.2.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4c46056e6b6f3241547ecf7a116fd83fb55b29f6a669c095e20ec755ef7d777
|
|
| MD5 |
d855db59ae30d8f6e0bb03a67c5e073d
|
|
| BLAKE2b-256 |
ae45187906cba540d2644d0e5805fb2a1fbe1f51436df89512250593c88c6f3c
|
File details
Details for the file ida_script_mcp-1.0.2-py3-none-any.whl.
File metadata
- Download URL: ida_script_mcp-1.0.2-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
251941618a28b378ba05e5e0d6644d1d3ae102c83d5c9dedf1a2b7c2a79d7cda
|
|
| MD5 |
829f05729b2a51cbc405329c5918f935
|
|
| BLAKE2b-256 |
06fbf6109b4f0487ae37641e34a34a80faf52ecc1e2df40f03d0437e64e8c0b3
|