Evidence-backed reverse engineering and human-gated software planning for Pi and MCP coding agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Understand an unfamiliar codebase with an AI agent β and get a validated spec you can rebuild from. CodeCartographer turns a repository into layered architecture, behavioral contracts, defect findings, and a language-agnostic reimplementation spec, with each phase validated before the next one runs. Works with Pi, Claude Code, Cursor, Codex, or any MCP-capable agent.
Asking an LLM to "analyze this repo" loses context halfway through, hallucinates findings, and leaves no artifact the next session can pick up. CodeCartographer fixes three things:
The filesystem is the memory, not the conversation. Each phase writes a smaller, templated, evidence-tagged artifact to .codecarto/findings/. Later phases re-read the specific upstream files they need. A new session β or a context compaction β picks up from status.yaml without losing progress.
Every phase attests to its own completion, and the gate holds it to that. Each output ends with a ## Validation table where the phase marks every completion criterion PASS, PARTIAL, or FAIL with evidence. Validation parses that table, cross-checks the findings' evidence/action pairing and the declared secondary outputs, and refuses to advance on a FAIL, a missing output, or a verdict it cannot read. It does not re-judge the criteria itself β that is the model's honest self-assessment plus two mechanical checks, which is exactly what a later phase can hold the earlier one to.
The output is a spec, not a chat log. The final reimplementation-spec.md is language-agnostic, module-inventoried, and carries acceptance scenarios plus known unknowns. Hand it to another agent to rebuild from.
Every finding is tagged with an evidence level: observed fact, strong inference, portability hazard, external-behavior claim, or open question.
| What you get | Where it lives |
|---|---|
| Layered analysis pipeline β architecture β defect scan β behavioral contracts β protocols β porting β reimplementation spec | .codecarto/ template |
Validation gates between phases β the phase's own ## Validation table plus two cross-checks; no advancing past a FAIL | core/ state machine |
| Three surfaces, one framework β Pi extension (recommended), MCP server (for other coding agents), or drop-in template (one-off / evaluation) | All three share core/ |
| Live progress widget while phase sub-agents work | Pi extension |
| HTML dashboard β single-file aggregate of progress, links, usage, narrative | .codecarto/dashboard.html |
| Per-phase token tracking | /codecarto-usage |
| Opt-in LLM steering of the next phase's seed prompt | /codecarto-next --llm-steer |
| Forward synthesis β vision + confirmed library specs β provenance-backed project plan | pipeline-synthesis.yaml |
Publish completed reimplementation specs from Pi or MCP, then run the synthesis pipeline to turn a product vision and explicitly confirmed library entries into a conflict-aware project-plan.md with a decision-level provenance ledger.
If CodeCartographer saves you a day of codebase archaeology, star the repo β it helps the next person find it.
OpenAI Build Week reviewers: see the new-vs-existing scope and one-command demo.
Three surfaces, in recommended order. All three share the same core/ and produce byte-identical phase prompts. Pi provides the richest orchestration UX; Pi and MCP both support the executable library and synthesis workflows; drop-in mode provides the analysis framework without those runtime operations.
.codecarto/ markdown + YAML for one-off evaluation or any LLM that can read and write files. Library and synthesis workflows are not available in pure drop-in mode; the analysis side works fully.Pi is a TUI coding agent. The CodeCartographer extension adds slash commands, a live agents widget, and the dashboard.
Don't run
npm install codecartographer-pifor the Pi use case. Plainnpm installputs the package on disk but doesn't register it with Pi. Usepi install npm:...so Pi writes the package into its own~/.pi/agent/settings.json.
For extension development, point Pi directly at the entrypoint:
Use this when your coding agent isn't Pi β Claude Code, Codex, opencode, Cursor, Claude Desktop, or anything else that speaks MCP. The host drives the conversation and runs the LLM; CodeCartographer provides phase prompts, validation, and experimental library publish/list/reindex operations.
30-second setup for Claude Code, Cursor, Codex, and Claude Desktop: see the MCP quickstart.
Teaching an agent to drive it: call the
codecarto_guidetool β the server returns the full drive loop, the phase-handoff contract, executor selection, and recovery patterns, with nothing to install. The same content ships as an installable skill atagent-skill/codecartographer/for agents that load skills from disk, and/codecarto-guide [topic]reads it into a Pi session.
Add to your host config (~/.config/claude-code/config.json, claude_desktop_config.json, etc.):
Official MCP Registry listing: io.github.HuginnIndustries/codecartographer.
Use this to try CodeCartographer in any repo without installing anything, or in environments where neither Pi nor an MCP-capable agent is available. Works with any LLM that can read and write files.
Then in the LLM session: Read .codecarto/GUIDE.md and begin the analysis.
Limitation. Drop-in mode runs the analysis pipeline fully, but library + synthesis workflows require executable code through Pi or MCP.
Analysis turns repositories into reusable specifications. Synthesis runs the other direction: it combines a raw product vision with human-confirmed specifications and produces an implementation-ready plan without losing provenance.
Configure the library that contains specs published with /codecarto-publish or the MCP codecarto_publish tool:
Initialize a clean planning workspace and fill in its brief:
Edit .codecarto/inputs/vision.md with the audience, problem, desired outcome, constraints, and non-goals.
Run until CodeCartographer creates the candidate proposal:
The run intentionally stops before merging. Review .codecarto/findings/goal-synthesis/proposal.md and change one or more candidate boxes from [ ] to [x].
Resume:
The final .codecarto/findings/goal-synthesis/project-plan.md contains product scope, architecture, work packages, acceptance gates, an unresolved-conflict register, and a provenance ledger mapping every load-bearing decision back to the vision or a confirmed specification. Runtime preflight checks prevent merging or finalization before explicit human confirmation.
The "code" is structured Markdown + YAML inside .codecarto/:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/codecartographer)<a href="https://allmcps.com/mcp/codecartographer"><img src="https://allmcps.com/api/badge/codecartographer?style=directory" alt="CodeCartographer on AllMCPs" /></a>