Logo Ramune-ida

Ramune-ida

Tổ chức
RamuneIDA

Headless IDA Pro MCP Server — expose IDA Pro's reverse engineering capabilities to AI agents for more efficient automated analysis.

Nhà phát hànhRamuneIDA
Kho mãRamune-ida
Ngôn ngữPython
Bản fork
3
Sao
30
Công cụ có sẵn
0
Phương thức truyền tảistdio, streamable-http
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Ramune-ida cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    30 sao và 3 bản fork từ kho mã được liên kết.

Ramune-ida

[WIP] This project is under active development. APIs and features may change without notice.

The main branch contains unstable updates. For stable versions, please use commits marked with release tags.

Headless IDA Pro MCP Server — expose IDA Pro's reverse engineering capabilities to AI agents via the Model Context Protocol.

中文版


What is this?

Ramune-ida runs IDA Pro (idalib) in headless mode and wraps it as an MCP server. AI agents like Claude, Cursor, or any MCP-compatible client can decompile functions, rename symbols, set types, and execute arbitrary IDAPython — all through structured tool calls.

Key Design Decisions

Process separation — The MCP server and IDA run in separate processes. The server is pure async Python; each IDA worker is a single-threaded subprocess communicating via dedicated fd-pair pipes (JSON line protocol). This eliminates all thread-safety issues that plague IDA SDK usage.

Plugin architecture — Tools are defined by metadata (description, parameters, tags) and handler functions. The server discovers tools at startup, dynamically generates MCP tool functions, and dispatches calls to the worker. Adding a new tool requires only a metadata file and a handler — no boilerplate registration code.

Worker is stateless — Workers are disposable command executors. All management state (task queues, crash recovery) lives in the Project layer. If a worker crashes, the project spawns a new one and reopens the IDB transparently.

Architecture

MCP Client (Claude / Cursor / ...)
    │  Streamable HTTP / SSE
    ▼
┌──────────────────────────────────┐
│  MCP Server (async Python)       │
│  FastMCP + Project management    │
│  Plugin discovery + registration │
└──────────────┬───────────────────┘
               │  fd-pair pipe (JSON lines)
         ┌─────┼─────┐
         ▼     ▼     ▼
      Worker Worker Worker
      idalib idalib idalib
      (plugin handlers)

Tools

Ramune-ida provides 28 tools (21 plugin tools + 7 session tools) covering the core reverse engineering workflow:

  • Session (7) — project lifecycle, database open/close, async task management
  • Analysis (4) — decompile, disassemble, cross-references, binary overview
  • Annotation (3) — rename symbols, read/write comments
  • Data (2) — auto-detect address type, read raw bytes
  • Listing (5) — enumerate functions, strings, imports, names, types (with filtering)
  • Search (2) — regex search across strings/names/disasm, byte pattern search
  • Types (3) — get/set types on functions/variables, declare C types (struct/enum/typedef)
  • Execution (1) — run arbitrary IDAPython with stdout/stderr capture
  • Undo (1) — IDA 9.0+ native undo

Low-frequency or exploratory operations are covered by execute_python, which provides full IDAPython access within the IDA environment.

Features

  • Metadata-driven plugin system — tools auto-discovered at startup, dynamic MCP registration, external plugin folder support
  • Framework tags — kind:read / kind:write / kind:unsafe — write tools auto-create undo points
  • Tag filtering — --exclude-tags to hide tools from MCP by tag, path glob, or name
  • Graceful cancellation — SIGUSR1 + sys.setprofile hook → 5s watchdog → SIGKILL fallback
  • Crash recovery — auto-recover from IDA component files, fallback to .i64, periodic .i64 packing
  • Output truncation — oversized output truncated with HTTP download for full content
  • File upload/download — HTTP endpoints for binary and IDB transfer

Plugins

Ramune-ida supports external plugins via <data-dir>/plugins/ (default ~/.ramune-ida/plugins/). Drop a plugin folder with metadata.py + handlers.py and restart — tools appear automatically.

See Writing Plugins for the full guide, including metadata reference, framework tags, handler contract, security model, and a complete example.

Quick Start

Requirements

  • Python >= 3.10
  • IDA Pro 9.0+ with idalib
  • uv (package manager)

Install

bash
git clone https://github.com/RamuneIDA/Ramune-ida.git
cd Ramune-ida
uv sync

Run

bash
# Default: Streamable HTTP on 127.0.0.1:8000
uv run ramune-ida

# Specify host and port
uv run ramune-ida http://0.0.0.0:8745

# Use IDA's bundled Python for workers
uv run ramune-ida --worker-python /opt/ida/python3

# SSE transport (legacy MCP clients)
uv run ramune-ida sse://127.0.0.1:9000

# Stdio transport (MCP over stdin/stdout, no network listener)
uv run ramune-ida stdio://

# Local mode (see "Local mode" below)
uv run ramune-ida --local stdio://

Local Mode

By default Ramune-ida treats each project as its own workspace under <data-dir>/projects/<project_id>/ and exposes HTTP endpoints so clients can upload binaries / download truncated outputs. This works well in containerised deployments but is awkward for direct local use on your own machine.

--local switches to a simpler on-disk layout:

  • All projects use the server cwd as their work_dir — no hidden per-project directory is created.
  • open_database accepts absolute paths or paths relative to cwd; you do not need to upload anything first.
  • The POST /files/... and GET /files/... HTTP endpoints are disabled (return 404).
  • Truncated tool outputs are written to <cwd>/.ramune-outputs/<project_id>/ and referenced by absolute filesystem path so clients can read them directly without HTTP.
  • close_project never deletes the cwd; it only wipes that project's .ramune-outputs/<project_id>/ subdirectory.
  • Web UI (--web) is force-disabled — the Web UI would otherwise enumerate the entire cwd.

Typical configuration for a stdio-based MCP client (Claude Desktop / Cursor / Codex CLI):

json
{
  "mcpServers": {
    "ramune-ida": {
      "command": "uv",
      "args": ["run", "ramune-ida", "--local", "stdio://"],
      "cwd": "/path/to/your/reversing/workspace"
    }
  }
}

MCP Client Configuration

For Claude Desktop or Cursor, add to your MCP config:

json
{
  "mcpServers": {
    "ramune-ida": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Basic Workflow

1. open_project()                          → get project_id
2. open_database(project_id, "target.exe") → IDA analyzes the binary
3. decompile(project_id, "main")           → decompiled C code
4. rename(project_id, addr="main", new_name="entry_main")
5. set_type(project_id, addr="0x401000", type="int foo(char *buf, int len)")
6. execute_python(project_id, code)        → run any IDAPython script
7. close_database(project_id)              → save and close
8. close_project(project_id)               → clean up

Project Isolation via Authorization Header (Experimental, Provisional)

This is a provisional, hacky implementation. The interface, on-disk format, and overall approach may change or be replaced at any time without notice. It exists today only because we needed some basic isolation for shared deployments; do not depend on it.

When the server runs over HTTP, every inbound request's Authorization header is captured. If a request carries one, the server enforces a tiny per-project ACL:

  • open_project writes the caller's auth string into <work_dir>/.auth for any newly created project.
  • Any subsequent tool call (or open_project reuse) targeting that project_id from a different auth is rejected with project_id '<id>' is already in use.
  • The projects tool only lists projects owned by the current auth, plus any unowned legacy projects.
  • Requests without an Authorization header are trusted and see/use everything (legacy behaviour).
  • --local and stdio:// modes have no HTTP header and therefore skip the entire ACL.

There is no token validation, no user model, no key file — the auth string is treated as an opaque namespace identifier. If you need real authentication / OAuth, terminate it at a reverse proxy (e.g. nginx) in front of Ramune-ida.

The HTTP file endpoints (POST /files/..., GET /files/...) intentionally do not check this ACL — anyone holding the URL can read or write the file. Treat upload/download URLs returned by open_project as capability tokens.

Web UI (Experimental)

Ramune-ida includes an optional web interface for observing AI agent activity and browsing IDA database state in real time. Enable it with --web:

bash
uv run ramune-ida --web

Features:

  • IDA-style linear disassembly (IDA View) with virtual scrolling and bidirectional loading
  • Decompilation with tree-sitter C syntax highlighting and line-level sync
  • Hex View with byte-level selection, multi-format copy, and virtual scrolling
  • Address space overview bar with per-pixel type mapping, zoom, and click-to-navigate
  • Right-click context menu on all panels (Copy address, Xrefs, Go to definition)
  • Keyboard shortcuts (X=Xrefs, G=Search, Esc=Back, mouse side buttons)
  • Cross-reference panel with manual query mode
  • Local Types browser with inline C definition expansion and nested type navigation
  • Search panel (regex + byte pattern)
  • Real-time AI activity stream with per-tool detail expansion
  • Dockable panel layout (drag, float, merge tabs) with persistent state
  • Auto-navigate to main/start on database open

See Web UI Documentation for details.

Note: The Web UI frontend was primarily written by AI (Claude) and has not undergone thorough code review.

Directory Layout

All data is stored under a single data directory (default ~/.ramune-ida, configurable via --data-dir or RAMUNE_DATA_DIR):

PathDescription
<data-dir>/projects/Project work directories (IDB files, outputs)
<data-dir>/plugins/External plugin folder

CLI Options

OptionDefaultDescription
urlhttp://127.0.0.1:8000Transport URL
--worker-pythonpythonPython interpreter for IDA workers
--soft-limit4Advisory threshold for concurrent workers
--hard-limit8Maximum concurrent workers (0 = unlimited)
--data-dir~/.ramune-idaData directory for projects and plugins (RAMUNE_DATA_DIR)
--auto-save-interval300Seconds between auto-saves (0 = disabled)
--output-max-length20000Truncate tool output beyond this many chars
--exclude-tags—Comma-separated tags to exclude from MCP (supports ::* globs)
--weboffEnable Web UI on the same port (ignored under --local or stdio://)
--localoffLocal mode: projects use cwd; disable /files endpoints and Web UI; outputs referenced by absolute path

Building

From source

bash
git clone https://github.com/RamuneIDA/Ramune-ida.git
cd Ramune-ida
uv sync
uv run ramune-ida

With frontend rebuild

Requires Node.js >= 18:

bash
RAMUNE_BUILD_WEB=1 uv build

Without RAMUNE_BUILD_WEB, uv build uses the pre-built frontend assets in the repository.

Docker

Requires a pre-built ida-pro:latest base image with IDA Pro installed

The Dockerfile uses multi-stage build — Node.js builds the frontend, the final image only contains Python + IDA. Web UI is enabled by default.

bash
docker build -t ramune-ida .
docker run -p 8000:8000 ramune-ida
Environment VariableDefaultDescription
TRANSPORThttp://0.0.0.0:8000Transport URL
SOFT_LIMIT4Advisory threshold for concurrent workers
HARD_LIMIT8Maximum concurrent workers
RAMUNE_DATA_DIR/data/ramune-idaData directory (projects + plugins)

License

MIT

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "ramuneida-ramune-ida": {
      "command": "",
      "args": []
    }
  }
}

Dùng MCP Ramune-ida với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Ramune-ida, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. Bạn có thể chạy MCP ngay trên thiết bị của mình hoặc kết nối qua URL của máy chủ MCP từ xa.

Cách 1: Dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Ramune-ida làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Ramune-ida.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "ramuneida-ramune-ida": {
      "command": "npx",
      "args": [
        "-y",
        "Ramune-ida"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Ramune-ida, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Ramune-ida.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Ramune-ida giúp tôi làm việc này không?
Ramune-ida
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Ramune-ida.

Cách 2: Thêm URL máy chủ MCP

Dùng cách này khi Ramune-ida đã được lưu trữ từ xa hoặc nhóm của bạn muốn có một trình kết nối dùng chung cho nhiều người dùng.

1

Mở mục Trình kết nối MCP

Trong TypingMind, vào Plugin, mở mục Trình kết nối MCP, rồi chọn Thêm URL.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Vào mục Plugin.
  3. Mở mục Trình kết nối MCP.
  4. Nhấp vào Thêm URL.
Biểu mẫu Thêm URL máy chủ MCP tùy chỉnh của TypingMind
2

Dán URL máy chủ

Nhập URL máy chủ của bạn vào trường URL máy chủ. Thêm tên kết nối, mô tả, biểu tượng, header HTTP tùy chỉnh hoặc cài đặt ứng dụng khách OAuth nếu máy chủ yêu cầu.

  1. Dán URL máy chủ của bạn vào trường URL máy chủ.
  2. Nhập tên kết nối cho Ramune-ida.
  3. Thêm mô tả và biểu tượng nếu bạn muốn dễ nhận biết kết nối hơn.
  4. Thêm header HTTP tùy chỉnh hoặc thông tin ứng dụng khách OAuth nếu máy chủ yêu cầu xác thực.
3

Tạo kết nối

Nhấp vào Tạo kết nối, sau đó quay lại danh sách Plugin và xác nhận kết nối MCP mới đang hoạt động.

  1. Nhấp vào Tạo kết nối.
  2. Quay lại danh sách trình kết nối MCP.
  3. Xác nhận kết nối Ramune-ida hiển thị trạng thái đang hoạt động.
  4. Làm mới danh sách plugin nếu kết nối chưa xuất hiện ngay.
4

Đổi mô hình mà không cần kết nối lại

Bắt đầu cuộc trò chuyện với mô hình bạn thích, bật các công cụ của Ramune-ida trong mục Plugin và chuyển sang mô hình khác khi cần. Kết nối MCP vẫn sẵn dùng trong không gian làm việc TypingMind.

  1. Bắt đầu cuộc trò chuyện mới trong TypingMind.
  2. Chọn mô hình AI bạn muốn dùng.
  3. Bật các công cụ của Ramune-ida trong mục Plugin.
  4. Yêu cầu mô hình dùng công cụ khi cần.
  5. Chuyển sang mô hình AI khác và dùng lại cùng kết nối MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Ramune-ida giúp tôi làm việc này không?
Ramune-ida
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Ramune-ida.

Câu hỏi thường gặp

Máy chủ MCP Ramune-ida dùng để làm gì?

Ramune-ida là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Ramune-ida với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Ramune-ida với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Ramune-ida với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Ramune-ida, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Ramune-ida với TypingMind?

Bạn có thể kết nối Ramune-ida trong TypingMind bằng trình kết nối MCP cục bộ hoặc bằng cách thêm URL máy chủ MCP từ xa. Dùng trình kết nối cục bộ khi máy chủ cần truy cập tệp, ứng dụng hoặc tài nguyên riêng trên thiết bị của bạn; dùng URL máy chủ khi máy chủ MCP được lưu trữ từ xa.

MCP Ramune-ida cung cấp những công cụ nào trong TypingMind?

Ramune-ida cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Ramune-ida không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Ramune-ida yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇