Governance MCP server for agent-maintained knowledge bases (OKF): git-backed writes, search, lint.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
MCP governance server in Go for the Agentic Wiki β knowledge that composes, not that you query.
[!WARNING] Beta software. Cartographer is pre-1.0: the MCP tool surface, CLI and configuration may change between minor releases without a deprecation period. Breaking changes bump the minor version (0.x semantics) and are called out in the changelog. Expect rough edges β bug reports are very welcome.
LLM agents forget everything between sessions, and stateless RAG only bolts retrieval onto that amnesia. The alternative is a knowledge base the agent itself builds and maintains over time β but letting an agent loose on a folder of files ends in broken links, lost history, and silent corruption. Cartographer is the governance layer that makes the pattern safe: the agent works the wiki exclusively through MCP tools, and the server enforces every invariant β validation, linking, immutability gates, one git commit per write.

Cartographer implements the Agentic Wiki: a persistent knowledge base of interlinked Markdown files that an LLM agent grows and curates by talking to the server over the MCP protocol. The agent never touches the files directly.
The wiki is grounded in Karpathy's "LLM Wiki" pattern (operating model: knowledge accretes
over time, it is not stateless RAG) on top of the OKF substrate (Open Knowledge Format v0.1 by
Google Cloud) β each KB is a folder of .md files with YAML frontmatter, self-contained and
version-controlled with git. Zero lock-in: the wiki is readable by any tool, including Obsidian and
any text editor.
Cartographer offers two complementary profiles:
docs/control-plane.mdatlas_overview, index_get, concept_read, map_list,
graph_neighbors (outbound links or backlinks) and concept_list (scoped frontmatter facets)if_match / content-hash), including concept_new from KB-owned templates discovered through template_list, index_patch for curating root/Map/Journal index.md entries with the same bounded concept_patch semantics, and concept_batch for atomic multi-concept writes/patches across a large refactor (one commit, full rollback on any failure)lint (broken link, stale claim, orphan, map contracts), commit_gate,
gate_check, supersede, contradiction trackingdegraded + conflicts_list tool +
guided skill)?kb=<name> routing; bearer-token auth with scopes / RBACSKILL.md / agentskills.io format) with provisioning and clientβserver sync, including executable scripts and binary assetsCartographer separates a data plane from a control plane:
data/, organized as
atlas β map β concept (the KB, its thematic archives, the pages; journals are the
chronological maps). Plain files + git: history, diff, backup, sharing for free.The interaction rests on the MCP + Skill + Hook triad: MCP carries data and capabilities, Skills carry procedural know-how loaded on demand, Hooks carry deterministic 0-token automation.
Give an agent this prompt to install Cartographer, mount its first KB, connect itself, and verify the setup:
The primary path is four commands: install the binary, run it as a native service, create your first KB, and connect an agent client to it.
cartographer kb create <name> prints how to get the server to pick up the new KB
(cartographer service restart, or --restart to do it and wait for it automatically); service install itself hints at kb create if it starts with no KB mounted yet.
Upgrades of a native local install (brew upgrade or install.sh update) repair themselves:
the new binary restarts the running service and re-synchronizes the configured providers in
place β disconnect/connect is never an upgrade step. Only already-open agent sessions need
restarting. See docs/deployment.md Β§Upgrades, schema migration, and repo growth.
connect with no flags in a TTY opens an interactive form (server URL, server
name, token env var, auth) instead of the flag defaults; pass --no-input to
force the non-interactive behavior. Once connected:
For local stdio use (a single KB, no service, typically for development) or a manually-configured
HTTP server, see serve --kb <path> --init in docs/deployment.md β the native-service path above
covers everyday use.
| Environment variable | Default | Description |
|---|---|---|
CARTOGRAPHER_KB | β | KB path(s) (single, or multiple comma-separated) |
CARTOGRAPHER_DATA | β | Directory whose subfolders are auto-discovered KBs |
CARTOGRAPHER_HTTP | β | HTTP address (e.g. :39273). Absent = stdio only |
CARTOGRAPHER_AUTH | auto | true / false / unset (auto on HTTP) |
CARTOGRAPHER_TOKENS | β | Comma-separated bearer tokens |
CARTOGRAPHER_GIT_AUTOCOMMIT | true | One git commit per write operation |
CARTOGRAPHER_GIT_SYNC | true | fetch/pull-rebase + push on origin around each write |
CARTOGRAPHER_OLLAMA | β | Ollama server URL for semantic search |
CARTOGRAPHER_OLLAMA_MODEL | nomic-embed-text | Ollama embedding model |
CARTOGRAPHER_AUDIT_LOG | β | Audit log file path |
CARTOGRAPHER_AUDIT_KEY | β | Ed25519 key for audit signing |
Full list with CLI flags and defaults β docs/deployment.md.
The E2E suite drives the compiled binary through HTTP, CLI, filesystem and real
temporary git remotes. It is deterministic, requires no model credentials and
runs in CI. Full strategy β docs/testing.md.
Package-by-package map, with what each one owns β AGENTS.md Β§Code map (kept next to
the contributor instructions so there is a single copy to keep true).
Browsable at beppetemp.github.io/cartographer β same content as docs/, rendered.
The full index lives in docs/index.md. Main entry points:
docs/overview.md β vision, guiding principles, architecturedocs/data-plane.md β KB model, hierarchy, OKFdocs/control-plane.md β Go server, MCP tool APIdocs/concurrency.md β single-writer, git sync, conflictsdocs/deployment.md β topologies (local service / k8s / multi-server), backup, env varsIssues and PRs are welcome β see CONTRIBUTING.md for the build/test loop, the
PR flow (squash-merge, conventional titles, docs updated in the same PR), and how to find your way
around the codebase. Cartographer is a personal project maintained on a best-effort basis: no
response-time SLA. For security reports, see SECURITY.md.
Released under the Apache License 2.0. See LICENSE.
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/cartographer)<a href="https://allmcps.com/mcp/cartographer"><img src="https://allmcps.com/api/badge/cartographer?style=directory" alt="Cartographer on AllMCPs" /></a>