CR

claude-reverser/ida-instances-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

186 stars 25 forks 质量 78 趋势 25MIT

ida-pro-mcp 的定制构建——用于托管无头 IDA Pro 实例的稳定性硬化 MCP 服务器

概览

ida-pro-mcp 的自定义构建:一台让 MCP 客户端驱动 IDA Pro 的 MCP 服务器——经过重新设计,采用了针对托管的稳定性通行证(Ida-Instances 设置)。 这是 mrexodia ida-pro-mcp (MIT) 的一个分支。所有上游功劳归 Duncan Ogilvie 及其贡献者所有;以下自定义更改在本仓库中得以保留。 在上游 v2.0.0 基础上进行稳定性硬化: - Linux、macOS 或 Windows - Python(在 IDA 内使用 idapyswitch 以匹配)- IDA Pro(推荐 9.x)。- uv - 一个 MCP 客户端(Claude Code、光标、Codex、Opencode、VS Code 等) 为您的紫外线环境激活Idalib: 无头运行还需要IDADIR中的IDA安装目录。 启动时会生成(或从磁盘加载)的请求,所有没有它的请求都会收到401未授权——没有例外。 从拥有该实例的机器/网络获取一次密钥:

概述(AI 翻译)

ida-pro-mcp 的定制版本:an 允许MCP客户端的MCP服务器 drive IDA Pro — 重新设计为稳定通行证,旨在托管多个 无头idalib实例(Ida-实例设置)。

这是mrexodia的ida-pro-mcp(麻省理工学院)的一个分支。所有上游功劳归于此 邓肯·奥吉尔维及其贡献者;习俗 以下更改内容在本仓库中得以保留。

什么是习俗

在上游 v2.0.0 基础上进行稳定性硬化:

区域 变化
数据安全 部分数据库清理是基于所有权的:它从不删除其他活跃实例声称的.id0/.id1/.id2/.nam/.til文件,且在无法发现时失效安全
存档可靠性 idb_save 预算为600秒(原为60秒);idb_close 在失败存档后拒绝杀死工人,而不是默默丢弃更改
并发 主管锁定不再跨越工人生成(~120秒)、健康探针(~2.5秒/会话)或停滞工人终止——一次缓慢开启不可能冻结每个会话
鲁棒性 stdio上的JSON-RPC格式错误返回-32700/-32600,而不是导致代理崩溃

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

IDA-instances-MCP

Custom build of ida-pro-mcp: an MCP Server that lets MCP clients drive IDA Pro — reworked with a stability pass aimed at hosting multiple headless idalib instances (the Ida-Instances setup).

This is a fork of mrexodia’s ida-pro-mcp (MIT). All upstream credit goes to Duncan Ogilvie and contributors; the custom changes below are maintained in this repository.

What’s custom

Stability hardening on top of upstream v2.0.0:

Area Change
Data safety Partial-database cleanup is ownership-aware: it never deletes .id0/.id1/.id2/.nam/.til files claimed by another live instance, and fails safe when discovery is unavailable
Save reliability idb_save runs with a 600s budget (was 60s); idb_close refuses to kill a worker after a failed save instead of silently discarding changes
Concurrency Supervisor lock no longer spans worker spawn (~120s), health probes (~2.5s/session) or stale-worker termination — one slow open can’t freeze every session
Robustness Malformed JSON-RPC over stdio returns -32700/-32600 instead of crashing the proxy
Timeouts Proxy timeout raised 30s → 900s and made configurable (IDA_MCP_PROXY_TIMEOUT) so long decompiles don’t “fail” client-side while still running server-side
Networking Worker port TOCTOU now retries; SSE writes and teardown are lock-guarded; CORS policy reads are cached off the IDA main thread
Resource limits IDB trace log capped at 64 MB (IDA_MCP_TRACE_MAX_MB) with oversized arguments/results clipped; flush-failure queue bounded
Authentication Every HTTP request requires an instance API key; issued exactly once via GET /key, then burned. The key persists on disk so it survives restarts and reboots
Hosting endpoints GET /health (unauthenticated readiness probe), GET /sessions (open databases + last-accessed), POST /upload (direct binary upload with size cap)
Idle reaping Sessions untouched for IDA_MCP_IDLE_TIMEOUT minutes are auto-closed (saved first)
Graceful shutdown On SIGTERM/SIGINT every open database is saved before exit — no more lost work on pct stop
Self-update Startup checks GitHub releases; interactive sessions are offered a one-keypress auto-update
Hosting defaults Headless supervisor listens on 0.0.0.0:9999; the GUI plugin also binds 0.0.0.0 and now requires the same API key

Requirements

  • Linux, macOS or Windows
  • Python 3.11+ (use idapyswitch inside IDA to match)
  • IDA Pro 8.3+ (9.x recommended). IDA Free is not supported
  • uv
  • An MCP client (Claude Code, Cursor, Codex, Opencode, VS Code, …)

Setup

Activate idalib for your uv environment:

# linux (server deployment)
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "ida-instances": { "url": "http://your-host:9999/mcp", "headers": { "Authorization": "Bearer <key-from-/key>" } } } }