Skip to main content
Glama
Dogbolt MCP server

Dogbolt MCP server

by kadohack12

Dogbolt MCP server

M8ven Score CI License: MIT Python MCP Tests Dogbolt

An MCP server that lets an LLM (Claude Desktop, Cursor, ...) send a binary to dogbolt.org and read back the C code produced by its fleet of decompilers (Ghidra, Hex-Rays/IDA, Binary Ninja, angr, Snowman, RetDec, Reko, ...).

Dogbolt is asynchronous: you upload a binary, it returns an id, and a set of workers decompile it in the background. This server hides the polling loop and returns the finished results.

Reverse engineering · Decompiler · Binary analysis · Model Context Protocol

Tags: mcp · model-context-protocol · mcp-server · dogbolt · decompiler · reverse-engineering · reverse-engineering-tools · binary-analysis · ghidra · hex-rays · ida-pro · binary-ninja · angr · retdec · snowman · security-tools · malware-analysis · python · claude-desktop · cursor · llm · ai-tools · llm-tools

⚠️ Privacy and fair use

  • Dogbolt stores every uploaded binary publicly. Never submit secrets, private keys, or proprietary/confidential binaries.

  • The service is public and free: do not loop requests or hammer it.

  • Maximum file size: 2 MB (enforced both here and by Dogbolt).

Related MCP server: styx-mcp

Install

pip install "mcp[cli]" httpx      # runtime
pip install -e ".[dev]"           # for tests

Works with mcp 1.x (FastMCP) and 2.x (MCPServer); the import is chosen automatically.

Tools

Tool

Purpose

list_available_decompilers

Distinct decompilers and their versions

decompile_binary

Upload a binary and wait for the decompiled C

compare_decompilers

Decompile with several engines and compare them

get_decompilations_status

Progress/state of an already-uploaded binary

decompile_binary

decompile_binary(file_path, target_decompiler="Ghidra", timeout_seconds=180, include_code=True, max_chars_per_decompiler=20000, output_dir=None):

  • target_decompiler — a name (Ghidra, Hex-Rays, BinaryNinja, angr, rev.ng, ...), a comma-separated list, or all for every decompiler.

  • include_code=False — return only status, to avoid flooding the context.

  • Sources are truncated to max_chars_per_decompiler characters.

  • output_dir — when set, write each source to <binary>.<engine>.c in that directory (created if needed) and return only a compact summary per engine (path, line count, size, head preview) instead of the code. Ideal for large outputs.

compare_decompilers

compare_decompilers(file_path, engines=["Ghidra", "Hex-Rays", "BinaryNinja"], output_dir=None, timeout_seconds=180, max_chars_per_decompiler=8000):

  • One upload is shared across engines (same SHA256 cache).

  • Returns a Markdown comparison table plus per-engine details:

    | Moteur       | Statut | Temps  | Lignes | Fichier / Résumé   |
    | ---          | ---    | ---    | ---    | ---                |
    | Hex-Rays     | Succès | 3.32s  | 137    | `tiny.hex-rays.c`  |
    | BinaryNinja  | Succès | 10.49s | 86     | `tiny.binaryninja.c` |
    | Ghidra       | Succès | 46.71s | 135    | `tiny.ghidra.c`    |
  • engines accepts a list or a comma-separated string.

  • With output_dir, files are written and only summaries are returned; otherwise the code is returned inline (truncated).

Every call returns a dict containing binary_id, sha256, from_cache and a link (https://dogbolt.org/?id=<id>) so results stay reachable later.

SHA256 cache and rate limiting

Dogbolt stores binaries under their SHA256 and de-duplicates uploads: the same bytes return the same binary_id without re-analysing. Uploads are also throttled (429 with a Retry-After header).

This server exploits both:

  • it hashes the file locally and keeps a {sha256: binary_id} cache, so a repeated file skips the upload entirely (from_cache: true in the result);

  • on 429 it waits for Retry-After and retries (up to 3 times), instead of hammering the public service.

Cache location: ~/.cache/dogbolt-mcp/cache.json. Override with DOGBOLT_CACHE, or disable with DOGBOLT_CACHE_DISABLE=1.

Note: a cached binary_id is still re-polled, because Dogbolt may have run additional decompilers since the first analysis.

Corrected API contract

The endpoints and fields below were verified against the live service (2026-11). A naive client gets several of these wrong:

  • GET /api/decompilers/ — public, paginated ({count, next, previous, results}); returns one row per version, so de-duplicate by name.

  • POST /api/binaries/ — public, multipart field file. Returns {"id", "download_url", "decompilations_url"}. Use decompilations_url directly instead of rebuilding the URL.

  • GET /api/binaries/<id>/decompilations/ — public, paginated. Each item: {"decompiler": {"name", "version", ...}, "error": null|str, "download_url": str, "analysis_time": float, "created": str}.

  • GET /api/binaries/<id>/ — requires authentication (401), so it is not used.

Two traps:

  1. There is no status field. A decompiler is finished once its result appears in the list with error is null; a failure has a non-null error. Do not wait for a "completed" string.

  2. The code URL is download_url, not decompiled_file.

Dogbolt runs 13 decompilers today; expected_total (default 13) controls when target_decompiler="all" stops waiting.

Two more behaviours worth knowing:

  • Uploads are content-addressed by SHA256: re-sending identical bytes returns the same binary_id (the S3 key in download_url equals the file's SHA256), so the same file is never analysed twice.

  • POST /api/binaries/ is throttled: over the limit it answers 429 with {"detail": "Request was throttled. Expected available in N seconds."} and a Retry-After header. Respect it.

Configuration

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/.config/Claude/claude_desktop_config.json (Linux):

{
  "mcpServers": {
    "dogbolt": {
      "command": "python",
      "args": ["/chemin/absolu/vers/dogbolt_mcp.py"]
    }
  }
}

Set DOGBOLT_BASE_URL to point at a self-hosted instance (default https://dogbolt.org). DOGBOLT_CACHE overrides the cache path and DOGBOLT_CACHE_DISABLE=1 disables it.

Compatibility and robustness

  • Works with mcp 1.x and 2.x (the SDK's server class is imported with a fallback). Annotations are real types at runtime (no from __future__ import annotations), so signature introspection on older SDKs cannot break.

  • HTTP failures never crash a tool: a bad binary_id (404), a throttled upload (429) or a network outage returns a structured {"error": ...}.

  • The first poll runs immediately, so an already-analysed binary returns at once instead of waiting one polling interval.

Inspector

npx @modelcontextprotocol/inspector python dogbolt_mcp.py

Tests

python3 -m pytest -q

The suite is offline: it covers path validation, name normalization, result filtering and progress accounting. Network calls were validated manually against the live API.

Usage example

"Décompile /tmp/crackme.bin avec Ghidra et Binary Ninja via Dogbolt, puis explique ce que fait main."

The assistant calls decompile_binary and analyses the returned C.

"Compare la décompilation de /tmp/crackme.bin avec Ghidra, Hex-Rays et Binary Ninja, et écris les résultats dans /tmp/out."

The assistant calls compare_decompilers with output_dir, gets a comparison table plus the written file paths, and can then open the files it needs.

Contributing

Issues and pull requests are welcome. Run the test suite before opening a PR:

pip install "mcp[cli]" httpx pytest
python -m pytest -q

License

MIT — free to use, modify and redistribute.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to autonomously reverse engineer binaries using Ghidra's capabilities including decompilation, function analysis, automatic renaming, and BSim integration for function similarity matching.
      1
      AGPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides 7 reverse-engineering tools (hexdump, disasm, strings, xref, Ghidra decompilation, angr symbolic execution, OLLVM deobfuscation) for LLM agents like hermes-agent and Claude Desktop.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs and MCP clients to autonomously reverse engineer applications by exposing core Ghidra functionality, including decompiling and analyzing binaries, renaming methods and data, and listing methods, classes, imports, and exports.
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to remotely control a disassembler/debugger for reverse engineering, including executing Python scripts, inspecting binaries, searching for values, text, or byte sequences, and retrieving disassembly, functions, exports, and strings.
      -