# Treasure Map

Treasure Map is a Claude Code MCP server that maps dangerous call sites in unpacked firmware and diffs binary patches across versions. The agent navigates facts to find vulnerabilities.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 25 repo stars
- Author: JoeyZzZzZz
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/JoeyZzZzZz/treasure-map
- Updated: 2026-11-24
- Security check: automated, 2026-11-24 (text) — warning: a command downloads a script from github.com and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/treasure-map

## What it does

The server runs static analysis over unpacked firmware binaries using Ghidra, surfacing call sites for command execution, memory buffers, format strings, and file access. It records argument provenance, user controllability, and explicit missing data flags instead of generating automated vulnerability scores.

For version comparisons, `tmap diff` runs Ghidra, BinExport, and BinDiff across modified binaries to generate function-level patch diffs alongside script changes. Running the server requires executing `tmap init` beforehand to configure the Ghidra toolchain. No external API keys or built-in models are needed; judgments remain in an annotation layer across sessions.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add treasure-map -- uvx tmap-agents
```
uvx runs the command named after the package; if the README names another one, use uvx --from tmap-agents <command>

### Codex

**Platform CLI**
```bash
codex mcp add treasure-map -- uvx tmap-agents
```
uvx runs the command named after the package; if the README names another one, use uvx --from tmap-agents <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "treasure-map": {
            "command": "uvx",
            "args": [
                "tmap-agents"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from tmap-agents <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "treasure-map": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "tmap-agents"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from tmap-agents <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add treasure-map uvx tmap-agents
```
uvx runs the command named after the package; if the README names another one, use uvx --from tmap-agents <command>

## When to use it
- firmware attack surface map
- find dangerous binary call sites and argument origins
- diff binary patches across firmware releases
- track nvram keys across programs and web endpoints

## Example prompts
- Scan the unpacked firmware directory and list command execution calls with user-controlled input
- Diff the two firmware versions and identify changes in memory copy bounds
- Trace which binaries and scripts write to the nvram setting `http_username`

## Similar
- [reverse-engineer](https://affpapa.org/en/nevibecode/agents/0xsteph-reverse-engineer.md) — subagent · ★ 2493 repo stars
- [reverse-engineer-anything](https://affpapa.org/en/nevibecode/skills/reverse-engineer-anything.md) — skill · 20600 installs
- [ghidra](https://affpapa.org/en/nevibecode/skills/ghidra.md) — skill · 706 installs
- [ghidra-headless](https://affpapa.org/en/nevibecode/skills/ghidra-headless.md) — skill · 647 installs
- [deep-analysis](https://affpapa.org/en/nevibecode/skills/deep-analysis.md) — skill · 544 installs
- [reverse-engineering](https://affpapa.org/en/nevibecode/skills/mohitmishra786-reverse-engineering.md) — skill · 463 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
