Case study
wikimcp
A git-backed wiki MCP server that gives any AI client persistent, compounding long-term memory.
Highlights
- 18 MCP tools (11 core + 7 graph)
- 158/158 tests passing
- 90%+ coverage on graph modules
- auto-commits every write to git
wikimcp is a self-hosted MCP server that turns a plain git repo of markdown files into long-term memory for any MCP-aware AI client, Claude Desktop, Gemini CLI, LM Studio, or a custom agent.
The core idea is a three-layer split: a raw source vault holds unprocessed material, an AI-maintained wiki layer holds topics, entities, and chat summaries, and a schema-driven workflow guide is handed to the client automatically through the wiki_info tool at the start of a session, so a new client knows the retrieval conventions without being told.
Retrieval is tiered by cost. retrieve_context runs pure BM25 with title and heading boosts and answers most questions directly. search_pages uses the same ranking to help find a page worth opening. search_wiki is full-text plus an optional hybrid vector layer, feature-hashed tokens and character trigrams rather than embedding-model semantics, reserved for exact-string lookups where an approximate match would be noise.
On top of that sits a fully offline graph layer: backlinks, hub detection by degree centrality, orphan and dead-end detection, shortest-path between two pages, and a surprising-links tool that surfaces cross-domain connections between pages sharing no tags. None of it calls a model, so it is cheap enough to run on every turn, and a git post-commit hook keeps an offline graph.html and a WIKI_REPORT.md digest current automatically.
Shipped to PyPI at v0.2.0 with 18 MCP tools (11 core, 7 graph) and a test suite passing 158 of 158 cases with 90%+ coverage on the graph modules.