idapin-mcp
idapin-mcp
Canalización de Windows que compila la herramienta PIN idadbg de IDA, la conecta a IDA Pro y expone el mismo pintool a cualquier IA compatible con MCP (Grok, Claude Desktop, Cursor, VS Code, …) sin abrir la GUI de IDA.
Este repositorio incluye el código fuente completo del proyecto: el pintool de Windows (pintool/), el servidor MCP (src/idapin_mcp/) y la canalización de instalación/compilación (scripts/).
PIN instrumenta un proceso en vivo. idadbg habla el protocolo de pintool de IDA (v9). El proceso MCP es un cliente TCP de ese protocolo, por lo que las herramientas de IA no necesitan la GUI de IDA.
Intel PIN (pin.exe) no está incluido aquí (licencia de Intel). scripts/setup.ps1 descarga el kit MSVC de PIN 3.31.
Qué obtienes
Ruta | Función |
|
|
| Servidor MCP stdio ( |
| Descargar PIN → compilar pintools → parchear |
| Fragmentos de ejemplo de IDA + MCP |
AI client --stdio MCP--> python -m idapin_mcp --TCP--> pin.exe + idadbg*.dll --instrument--> target.exe
IDA Pro --dbg_pin.cfg--> pin.exe + same DLLs (optional GUI tracer)Related MCP server: headless-re-mcp
Requisitos (Windows)
Windows 10/11 x64
Python 3.10+
Visual Studio 2017 o posterior con MSVC x86/x64 (2019, 2022, 2026 funcionan; el script de compilación elige el conjunto de herramientas más reciente)
Windows 10 SDK (cualquier 10.0.* instalado con VS)
IDA Pro 7.x/8.x/9.x opcional, solo si además quieres el trazador PIN de la GUI
Red una vez, para descargar Intel PIN 3.31 (
pin-external-3.31-98869-…-msvc-windows.zip)
No se requieren permisos de administrador si no puedes escribir en C:\pin — establece -PinRoot "$env:LOCALAPPDATA\idapin-mcp\pin" (las rutas sin espacios son más seguras para PIN).
Configuración con un solo comando
En PowerShell, desde la raíz del repositorio:
Set-ExecutionPolicy -Scope Process Bypass
.\scripts\setup.ps1Eso hará:
Crear
%LOCALAPPDATA%\idapin-mcp\venvypip install -e .Descargar PIN 3.31 en
C:\pin(o en la ruta que pases)Copiar
pintool/enPIN\source\tools\idapin, reajustar el proyecto de VS y compilar Release para Win32 + x64Parchear
dbg_pin.cfgen todas las instalaciones de IDA que encuentreRegistrar el servidor MCP en las configuraciones de usuario de Grok, Claude Desktop, Cursor y VS Code
Después, reinicia el cliente de IA.
Ubicación personalizada de PIN:
.\scripts\setup.ps1 -PinRoot "$env:LOCALAPPDATA\idapin-mcp\pin"Paso a paso en lugar del script general: docs/windows-build.md.
Herramientas MCP (para cualquier IA)
Después del lanzamiento, el proceso queda suspendido en PROCESS_STARTED. Establece puntos de interrupción y luego reanuda.
Herramienta | Propósito |
| Iniciar PIN + el pintool en un EXE de Windows |
| Eventos de sesión y depuración |
| Puntos de interrupción por software |
| Registros / memoria |
| Control |
| Secciones mapeadas |
| Trazado de instrucciones |
| Terminar el árbol de procesos de PIN |
Ejemplo de prompt:
Usa idapin MCP:
pin_launchsobreC:\Windows\System32\cmd.execon argumentos/c echo hi, lee los registros y luegopin_resumeypin_stop.
Fragmento MCP manual: configs/mcp.example.json. Notas específicas por cliente: docs/ai-clients.md.
IDA Pro (trazador GUI)
setup.ps1 escribe:
PIN_PATH = "C:\\pin\\pin.exe";
PIN_TOOL_PATH = "C:\\pin\\source\\tools\\idapin";
PIN_TOOL_OPTIONS = 1En IDA: Debugger → Select debugger → PIN tracer y luego F9. Detalles: docs/ai-clients.md.
idalib en modo headless no puede iniciar pin_user.dll; por eso este MCP habla con el pintool directamente.
Licencia
Licencias separadas. El servidor MCP es MIT; el pintool no.
Árbol | Licencia / copyright |
| MIT — LICENSE |
| Hex-Rays copyright 2014–2019 — pintool/COPYRIGHT. No es MIT. Se mantiene en forma de código fuente porque Intel prohíbe redistribuir herramientas PIN compiladas. |
Kit de Intel PIN ( | Intel. No está en este repositorio. Descárgalo por separado y acepta la licencia de Intel. |
Consulta NOTICE. No relicencies pintool/ como MIT.
No hagas commit de pin.exe, del ZIP de PIN ni de los *.dll compilados.
Publica en GitHub desde un navegador (sin instalar Git): docs/publish-github.md.
Available Tools
15 toolspin_add_bptB
Add a software breakpoint at ea (hex or int).
Inputs: ea (required).
pin_del_bptB
Remove a software breakpoint.
Inputs: ea (required).
pin_eventsB
Return (and optionally clear) queued debug events from the pintool.
Inputs: clear.
pin_launchA
Start Intel PIN + idadbg on a Windows EXE (no IDA GUI). Leaves the process suspended at PROCESS_STARTED so you can set breakpoints, then call pin_resume.
Inputs: target (required), args, port, trace_insns, +1 more.
pin_meminfoB
List mapped image/section ranges from the pintool.
Inputs: no named parameters.
pin_pauseB
Pause the instrumented process.
Inputs: no named parameters.
pin_read_memA
Read up to 1024 bytes of target memory. Returns hex.
Inputs: ea (required), size.
pin_read_regsC
Read general-purpose registers for a thread.
Inputs: tid.
pin_resumeA
Resume after an event. eid defaults to the last received event (PROCESS_STARTED=1, BREAKPOINT=5, STEP=6).
Inputs: eid.
pin_set_traceB
Set tracing flags (TF_TRACE_INSN=2, TF_REGISTERS=0x10, TF_TRACE_EVERYTHING=0x40). Combine with bitwise OR.
Inputs: flags (required).
pin_statusB
PIN session status: connected, last event, paths.
Inputs: no named parameters.
pin_stepB
Single-step the given OS thread (tid 0 = last event thread).
Inputs: tid.
pin_stopA
Send EXIT to the pintool and kill the PIN process tree.
Inputs: no named parameters.
pin_trace_countB
Number of recorded trace events currently buffered.
Inputs: no named parameters.
pin_write_memC
Write hex bytes to target memory.
Inputs: ea (required), hex (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct debugger operation: session control (launch/status/resume/pause/step/stop), event retrieval, breakpoint add/del, register/memory read/write, and tracing. The only slight adjacency is pin_events vs pin_trace_count, but the descriptions clearly separate debug events from buffered trace events.
All tools use a uniform pin_ prefix in snake_case with predictable verb_noun or noun forms (pin_add_bpt, pin_read_mem, pin_set_trace, pin_status). No mixed conventions or casing inconsistencies.
15 tools is well-scoped for a debugger/instrumentation control surface, with each tool covering a necessary operation rather than redundant variants. The count supports full session lifecycle without bloat.
Core debugger coverage is strong: launch/attach, breakpoints add/remove, stepping, memory read/write, register read, memory map, tracing, and teardown. Notable gaps remain: no pin_write_regs (only read), no breakpoint enumeration/list, and no module/symbol lookup, which slightly limits register and breakpoint management workflows.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Reasoning, code, anti-deception, memory harness MCP tools. Stdio or HTTPS api.ejentum.com/mcp
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Generate AI video, images and audio, and browse your history, from any MCP client.
Related MCP Servers
- FlicenseBqualityDmaintenanceA simple MCP server exposing persistent, scriptable Frida dynamic instrumentation to an AI agent for Windows reversing, malware/security analysis, and dynamic debugging.19-
- AlicenseNot gradedqualityBmaintenanceHeadless reverse engineering MCP server integrating IDA Pro for static analysis and x64dbg for dynamic debugging via controlled MCP tools.5GPL 3.0
- AlicenseNot gradedqualityFmaintenanceEnables AI-driven reverse engineering with x64dbg via 71+ MCP tools for breakpoints, memory, disassembly, tracing, debug control, PE analysis, and anti-anti-debugging, supporting HTTP, SSE, and stdio transports.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to autonomously inspect and control IDA Pro via MCP, providing tools for decompilation, disassembly, cross-references, renaming, typing, patching, searching, debugging, and arbitrary IDAPython execution.MIT