# treasure-map [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/JoeyZzZzZz/treasure-map  
**GitHub Stars:** 103  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/treasure-map

## Description
A firmware map for your AI agent, served over MCP. Finds dangerous call sites across a whole firmware image and diffs two versions to locate security fixes.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "treasure-map": {
    "command": "uvx",
    "args": ["--from","tmap-agents","tmap"]
  }
}
```

## Documentation

## What treasure-map does

treasure-map analyzes extracted firmware filesystems and exposes the resulting evidence to an AI agent through MCP. Its analysis covers four categories of potentially dangerous call sites: command execution, memory copies, format strings, and file paths.

For each candidate, the map records facts about argument origins, attacker controllability, writers and readers of relevant values, call reachability, filtering, and analysis completeness. Facts use YES, NO, or UNKNOWN states; unknown findings include the reason the tool could not establish more. The map also tracks which binaries, functions, and candidates have been reviewed.

The server does not run a model, require an API key, or issue vulnerability verdicts. It supplies read-only analysis facts and stores the agent's conclusions in a separate annotation layer.

## How it works

`tmap scan` decompiles binaries in an extracted firmware using Ghidra and builds a searchable map. It also records relationships such as NVRAM readers and writers, web-interface exposure, program launchers, init scripts, and resolved symlinks. Repeating a scan with the same workspace name resumes interrupted work.

`tmap diff` compares two scanned firmware versions. Ghidra, BinExport, and BinDiff process changed binaries, while scripts, configuration files, and web pages are compared by path. The result groups changed function pairs around relevant calls and highlights changes such as modified copy or format-call length constants. The agent receives work units for required review items, and unreviewed changes remain explicitly unreviewed.

Judgments persist in the atlas database across sessions, models, and agents. If the underlying facts change, affected judgments are flagged for review.

## Setup and configuration

The installation command downloads the latest installer and runs `tmap init`:

```bash
curl -LsSf https://github.com/JoeyZzZzZz/treasure-map/releases/latest/download/install.sh | sh
```

Initialization sets up the analysis toolchain, registers the MCP server with selected agents, and installs the diff-review skill for agents that use skills. Restart the agent after installation.

Scan an already-extracted filesystem with:

```bash
tmap scan ./firmware.extracted -w my-fw
```

Create a comparison by scanning both versions and then running:

```bash
tmap diff --before fw-v1 --after fw-v2
```

All scans and diffs are stored in one atlas at `~/.treasure-map/atlas.db`. `tmap doctor` checks the toolchain, configuration, and registrations. `tmap runs` lists and manages runs, while `tmap rescan` handles runs made outdated by an upgrade.

## Tools and capabilities

- Scan every binary in an extracted firmware with Ghidra.
- Find command-execution, buffer-copy, format-string, and file-path call sites.
- Trace argument provenance for command, copy, and format candidates.
- Record NVRAM readers and writers, launch paths, scripts, symlinks, and analysis gaps.
- Compare changed binaries, scripts, configurations, and web files between versions.
- Preserve agent judgments and identify annotations that need re-review.

## Limitations and notes

The input must be an already-unpacked firmware filesystem. Scanning is the slow step because it performs a Ghidra pass for each binary. Path and file candidates are detected and ranked, but their controllability comes from text-level analysis and is labeled accordingly.

The project is described as a developer preview, so commands, configuration, atlas data, and MCP tool fields may change incompatibly between versions. The tool supplies evidence rather than a vulnerability decision; the connected agent must interpret the findings and judge whether changes are security fixes.

_Full upstream README: https://allmcps.com/mcp/treasure-map/readme_

