Skip to main content
Glama
idapin-mcp
by ASkyeye

idapin-mcp

IDA의 idadbg PIN 도구를 컴파일하고 IDA Pro에 연동하며, 동일한 pintool을 IDA GUI를 열지 않고 MCP를 지원하는 모든 AI(Grok, Claude Desktop, Cursor, VS Code, …)에 노출하는 Windows 파이프라인입니다.

이 저장소에는 전체 프로젝트 소스가 포함되어 있습니다: Windows pintool(pintool/), MCP 서버(src/idapin_mcp/), 설치/빌드 파이프라인(scripts/).

PIN은 실행 중인 프로세스를 계측합니다. idadbg는 IDA pintool 프로토콜(v9)을 사용합니다. MCP 프로세스는 해당 프로토콜의 TCP 클라이언트이므로 AI 도구에 IDA GUI가 필요하지 않습니다.

Intel PIN(pin.exe)은 여기에 포함되어 있지 않습니다 (Intel 라이선스). scripts/setup.ps1이 PIN 3.31 MSVC 키트를 다운로드합니다.

제공 내용

경로

역할

pintool/

idadbg.cpp / 헤더 / .sln — idadbg.dll + idadbg64.dll로 컴파일

src/idapin_mcp/

MCP stdio 서버 (pin_launch, pin_read_regs, …)

scripts/setup.ps1

PIN 다운로드 → pintool 빌드 → IDA dbg_pin.cfg 패치 → MCP 설정 작성

configs/

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

요구 사항 (Windows)

  • Windows 10/11 x64

  • Python 3.10+

  • Visual Studio 2017 이상 MSVC x86/x64 포함 (2019, 2022, 2026 모두 작동하며, 빌드 스크립트는 최신 도구 집합을 선택합니다)

  • Windows 10 SDK (VS와 함께 설치된 10.0.* 버전)

  • IDA Pro 7.x/8.x/9.x 선택 사항, GUI PIN 트레이서도 원하는 경우에만

  • 네트워크 1회, Intel PIN 3.31을 받기 위해 (pin-external-3.31-98869-…-msvc-windows.zip)

C:\pin에 쓸 수 없다면 관리자가 필요하지 않습니다 — -PinRoot "$env:LOCALAPPDATA\idapin-mcp\pin"을 설정하세요 (공백이 없는 경로가 PIN에 더 안전합니다).

원커맨드 설정

저장소 루트의 PowerShell에서:

Set-ExecutionPolicy -Scope Process Bypass
.\scripts\setup.ps1

이 명령은 다음을 수행합니다:

  1. %LOCALAPPDATA%\idapin-mcp\venv를 만들고 pip install -e .를 실행합니다.

  2. PIN 3.31을 C:\pin(또는 사용자가 지정한 경로)에 다운로드합니다.

  3. pintool/을 PIN\source\tools\idapin에 복사하고, VS 프로젝트 대상을 재지정한 다음 Win32 + x64 Release로 빌드합니다.

  4. 발견된 모든 IDA 설치에서 dbg_pin.cfg를 패치합니다.

  5. Grok, Claude Desktop, Cursor, VS Code 사용자 설정에 MCP 서버를 등록합니다.

그런 다음 AI 클라이언트를 다시 시작하세요.

사용자 지정 PIN 위치:

.\scripts\setup.ps1 -PinRoot "$env:LOCALAPPDATA\idapin-mcp\pin"

통합 스크립트 대신 단계별로 진행하려면: docs/windows-build.md.

MCP 도구 (모든 AI용)

실행 후 프로세스는 PROCESS_STARTED에서 일시 중단됩니다. 중단점을 설정한 다음 재개하세요.

도구

용도

pin_launch

Windows EXE에서 PIN + pintool 시작

pin_status / pin_events

세션 및 디버그 이벤트

pin_add_bpt / pin_del_bpt

소프트웨어 중단점

pin_read_regs / pin_read_mem / pin_write_mem

레지스터 / 메모리

pin_resume / pin_pause / pin_step

제어

pin_meminfo

매핑된 섹션

pin_set_trace / pin_trace_count

명령어 트레이싱

pin_stop

PIN 프로세스 트리 종료

예시 프롬프트:

idapin MCP 사용: C:\Windows\System32\cmd.exe에서 인수 /c echo hi로 pin_launch 실행, 레지스터 읽기, 그런 다음 pin_resume 및 pin_stop 실행.

수동 MCP 스니펫: configs/mcp.example.json. 클라이언트별 참고 사항: docs/ai-clients.md.

IDA Pro (GUI 트레이서)

setup.ps1이 작성하는 내용:

PIN_PATH = "C:\\pin\\pin.exe";
PIN_TOOL_PATH = "C:\\pin\\source\\tools\\idapin";
PIN_TOOL_OPTIONS = 1

IDA에서: 디버거 → 디버거 선택 → PIN 트레이서를 선택한 다음 F9를 누릅니다. 자세한 내용: docs/ai-clients.md.

헤드리스 idalib는 pin_user.dll을 시작할 수 없습니다. 그래서 이 MCP는 pintool과 직접 통신합니다.

라이선스

라이선스가 분리되어 있습니다. MCP 서버는 MIT이고, pintool은 MIT가 아닙니다.

트리

라이선스 / 저작권

src/idapin_mcp/, scripts/, configs/, docs/, 이 README

MIT — LICENSE

pintool/

Hex-Rays 저작권 2014–2019 — pintool/COPYRIGHT. MIT가 아닙니다. Intel이 컴파일된 PIN 도구의 재배포를 금지하므로 소스 형태로 유지됩니다.

Intel PIN 키트 (pin.exe, 헤더, 라이브러리)

Intel. 이 저장소에 포함되어 있지 않습니다. 별도로 다운로드하고 Intel 라이선스에 동의하세요.

NOTICE를 참조하세요. pintool/을 MIT로 재라이선스하지 마세요.

pin.exe, PIN zip, 컴파일된 *.dll을 커밋하지 마세요.

브라우저에서 GitHub에 게시(Git 설치 불필요): docs/publish-github.md.

Available Tools

15 tools
pin_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

    A3.6/5.0

    Scored across 15 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      A simple MCP server exposing persistent, scriptable Frida dynamic instrumentation to an AI agent for Windows reversing, malware/security analysis, and dynamic debugging.
      19
      -
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables 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.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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