How blacktop/ida-mcp-rs works
ida-mcp-rs is a headless IDA Pro MCP server: an AI agent opens a binary or database, then invokes analysis and reverse-engineering tools and receives results or task progress. The server exposes a broad tool surface, dispatches work through local or pooled IDA workers, and handlers perform database, analysis, inspection, editing, and debugging operations. The README documents Apple-target loading and stateful scripting as notable capabilities. Several handler modules are unsampled, so their internal wiring is not inferred.
Main entry points: loop_impl.rs IDA dispatch loop · mod.rs MCP server · pool.rs Worker pool · analysis.rs Analysis
Components 19
MCP interface
- MCP server
src/server/mod.rs - Tool registry
src/tool_registry.rs - Tool profiles
src/server/tool_filter.rs - Background tasks
src/server/task.rs
Worker execution
- Worker pool
src/ida/pool.rs - IDA worker
src/ida/worker.rs - Request protocol
src/ida/request.rs - IDA dispatch loop
src/ida/loop_impl.rs
IDA operations
- Database lifecycle
src/ida/handlers/database.rs - Analysis
src/ida/handlers/analysis.rs - Binary inspection
src/ida/handlers - Annotations and edits
src/ida/handlers - Debugger
src/ida/handlers/debugger.rs - Script execution
src/ida/handlers/script.rs
Target and runtime support
- Apple target loading
src/macho_fat.rs - Shared cache loading
src/dsc.rs - Crash protection
src/crash_guard.rs - Progress reporting
src/ida/observability.rs
Other components
- AI agent
Connections 21
- AI agent → MCP server: calls tools
README.md - MCP server → Tool registry: registers tools
src/server/mod.rs - MCP server → Worker pool: dispatches work
src/server/mod.rs - MCP server → Background tasks: tracks tasks
src/server/mod.rs - Tool profiles → Tool registry: filters tools
src/server/tool_filter.rs - Worker pool → IDA worker: routes requests
src/ida/pool.rs - IDA worker → Request protocol: sends requests
src/ida/worker.rs - IDA dispatch loop → Request protocol: handles requests
src/ida/loop_impl.rs - IDA dispatch loop → Database lifecycle: dispatches operations
src/ida/loop_impl.rs - IDA dispatch loop → Analysis: dispatches operations
src/ida/loop_impl.rs - IDA dispatch loop → Binary inspection: dispatches operations
src/ida/loop_impl.rs - IDA dispatch loop → Annotations and edits: dispatches operations
src/ida/loop_impl.rs - IDA dispatch loop → Debugger: dispatches operations
src/ida/loop_impl.rs - IDA dispatch loop → Script execution: dispatches operations
src/ida/loop_impl.rs - Database lifecycle → Analysis: starts analysis
src/ida/handlers/database.rs - Binary inspection → Annotations and edits
- MCP server → Apple target loading: selects Mach-O slice
src/server/mod.rs - MCP server → Shared cache loading: loads shared cache
src/server/mod.rs - Worker pool → Crash protection: isolates crashes
- Worker pool → Progress reporting: emits progress
src/ida/pool.rs - Analysis → Progress reporting: reports progress