llm-wiki-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@llm-wiki-mcp what does the wiki say about grounding data?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
llm-wiki-mcp
Serve an LLM-maintained markdown wiki to agents over MCP.
If you keep a knowledge base in the shape Andrej Karpathy described — immutable raw sources, a wiki of markdown pages an LLM maintains, and a schema doc describing the conventions — this makes it queryable from any MCP client, without the agent having to walk your directory tree.
uvx llm-wiki-mcp --wiki ~/my-wikiIt is strictly read-only. It never writes to your wiki.
Why not just point the agent at the folder?
Because an agent given a directory reads the wrong things in the wrong order. It globs, opens files whole, and burns context rediscovering structure you already wrote down. This server front-loads the parts that are cheap and decisive: a curated index, one-line descriptions for every page, a tag vocabulary, and a best-match lookup that returns one page instead of forty snippets.
It also passes your wiki's own conventions doc through as the MCP server instructions — so a remote agent that has never opened your repo still follows your rules about linking, attribution, and what the page types mean.
Related MCP server: llmwiki-serve
Install
uv tool install llm-wiki-mcp # or: pipx install llm-wiki-mcp
uv tool install 'llm-wiki-mcp[ask]' # plus server-side synthesisRegister it with a client — for Claude Code:
claude mcp add my-wiki -- llm-wiki-mcp --wiki ~/my-wikiOr in claude_desktop_config.json / any MCP client config:
{
"mcpServers": {
"my-wiki": {
"command": "llm-wiki-mcp",
"args": ["--wiki", "/absolute/path/to/wiki"]
}
}
}Check what it found before wiring anything up:
llm-wiki-mcp --wiki ~/my-wiki --infoWhat it expects
Almost nothing. A directory of markdown files.
| reserved | Your curated catalog. Served by |
| reserved | Append-only history. Served by |
| optional | Immutable source documents. Excluded from search; reachable via |
| optional | Your conventions doc — served as the MCP instructions. |
| optional | A high-level orientation page. |
everything else | your pages | Any directory structure you like. |
Page types are discovered, not configured. A page's type is its frontmatter
type if it declares one, and otherwise the directory it lives in. So
concepts/, people/, notes/ — whatever you use — become filters
automatically. Filters tolerate singular and plural (--page_type concept finds
concepts/).
Frontmatter is plain YAML. Only type and title really matter; description
and tags are what make the cheap tools useful:
---
title: Grounding Data
description: Structured facts a publisher exposes to agents, rather than prose
type: concept
tags: [structured-news, publishing]
---description is load-bearing. It's what list_pages shows and what find_page
ranks on, so a page without one is half-invisible. Keep it to one line.
Tools
Tool | What it's for |
| The curated catalog. Read first. |
| The single best page, in full. "What does the wiki say about X?" |
| Every mention across the corpus. "Where is X discussed?" |
| A page by slug, path, or |
| Pages with descriptions; filter by type and tags ( |
| The page types in use, with counts. |
| The tag vocabulary with counts. Read before filtering by tag. |
| Change history. |
| A raw source document, text only. |
| Conformance report. |
| Only if |
| Only if |
Tools that would always fail aren't registered at all — a tool that returns "not configured" costs the client context and invites a wasted call.
find_page vs search_wiki
search_wiki is ripgrep: every hit, as snippets. find_page returns one whole
page, plus the runners-up by name so an agent can pivot.
Ranking weights title and slug — the page's identity — far above tags and
description, and length-normalizes them. This matters more than it sounds: a
page about a person almost never repeats their name in its own description, so
without that weighting an entity's own page loses to every source that cites it.
Short query tokens must match exactly (otherwise the matches authenticity);
longer ones match by containment in either direction, so plurals find singulars.
Validation
A wiki written by an agent across many sessions doesn't fail by crashing — it drifts. A page never makes it into the index. A link's target gets renamed. A description picks up a colon and stops being valid YAML, so every consumer that isn't a hand-rolled parser goes blind to it.
llm-wiki-mcp --wiki ~/my-wiki --validate
llm-wiki-mcp --wiki ~/my-wiki --validate --level error # what a hook should runErrors mean malformed — broken for any consumer: invalid YAML, frontmatter
opened and never closed, duplicate slugs that make a wikilink ambiguous.
Warnings mean degraded — still serves, but worse: no type, title,
description or tags; a page missing from the index; an index entry pointing at a
page that doesn't exist; a missing source; a wikilink split across lines by
hard-wrapping. Notes are informational: over-long descriptions, and
unresolved [[red links]] — aggregated per target with a citation count, so the
top of that list is a ranked backlog of pages worth writing.
Absent metadata is deliberately not an error. This server infers a title from the filename and a type from the directory, so a page without them still works — and a checker that fails on what its own server handles fine is a checker people turn off. A minimal wiki with no index, no log, and bare markdown pages passes a hook gating on errors.
Exit codes: 0 clean, 1 errors, 2 couldn't run. --strict fails on warnings
too. A ready-made git hook is in examples/pre-commit.
Two deliberate choices worth knowing about. Red links are notes, not warnings — in a living wiki most are pages you haven't written yet, and one finding per mention buries everything else. And a referenced source that is absent but gitignored is a note explaining why, not a warning: keeping large PDFs out of git is a normal policy, and a check that's mostly false positives teaches you to ignore the whole category.
Transports
stdio by default — what most MCP clients expect, and the client is the parent process, so there's nothing to authenticate.
HTTP for serving a wiki to agents on other machines:
LLM_WIKI_TOKEN=$(openssl rand -base64 32) llm-wiki-mcp --http --port 8848Requires a bearer token; refuses to start without one. Install the http extra.
DNS-rebinding protection is off by default (the typical client is a CLI agent
behind a token on a trusted network, not a browser) — set
LLM_WIKI_ALLOWED_HOSTS to turn on the allowlist.
The ask tool
With ANTHROPIC_API_KEY set and the ask extra installed, ask(question) runs
a turn-capped sub-agent over the same read-only tools and returns an answer
citing [[wikilinks]]. The index is pinned into a cached system prefix, so
repeated questions reuse it.
Use it when you want a finished answer rather than raw pages. Everything else works without it, and without any API key.
Configuration
Every flag has an environment variable. Flags win.
Env | Flag | Default |
|
| current directory |
|
|
|
| — | (required for |
|
|
|
| — |
|
| — |
|
| — |
|
| — |
|
| — |
|
| — | unset ( |
Relation to OKF
Google Cloud's Open Knowledge Format
describes a very similar artifact: markdown plus YAML frontmatter, type
required, index.md and log.md reserved. A Karpathy-format wiki that fills in
description is already close to an OKF bundle at the metadata layer. The
notable divergence is links — OKF uses relative markdown links, this expects
[[wikilinks]], which is what Obsidian and most LLM-maintained wikis actually
use. NRK's okf-mcp serves OKF bundles and is
worth a look if that's your format.
Development
uv sync --all-extras
uv run pytestLicense
GNU General Public License v2.0. See LICENSE.
Available Tools
11 toolsaskA
Answer a natural-language question against the wiki and return a cited answer. Use this when you want a finished answer rather than raw pages: it reads the index, searches, reads what matters, and synthesizes.
Args: question: The question to answer.
Inputs: question (required). Returns: result
find_pageA
Return the single page that best matches a topic, in full.
Use this for "what does the wiki say about X". Use search_wiki when you want every mention of X across the corpus.
Args: topic: What you're looking for, e.g. 'agent payments'. page_type: Optional type filter. See list_types. tags: Optional tag filter. See list_tags for the vocabulary. match: 'and' (page must carry every tag, default) or 'or' (any).
Inputs: topic (required), tags, match, page_type. Returns: result
get_indexA
Return the wiki index — a curated catalog of every page with one-line summaries. Read this first to navigate.
Inputs: no named parameters. Returns: result
get_logA
Return the wiki's change log, newest first — what was added when, and the reasoning recorded at the time. get_index says what the wiki holds; this says how it got there.
Args: since: Optional ISO date (YYYY-MM-DD); only entries on or after it. limit: Max entries. Defaults to a small window, as logs get large.
Inputs: limit, since. Returns: result
list_pagesA
List pages with their one-line descriptions, optionally filtered.
Args: page_type: Type to restrict to. See list_types. tags: Frontmatter tags to filter by. See list_tags. match: 'and' (page must carry every tag, default) or 'or' (any).
Inputs: tags, match, page_type. Returns: result
list_tagsA
List every tag in use with its page count, commonest first. Read this before filtering by tag — it is the only way to learn the vocabulary.
Args: page_type: Optionally restrict to one type.
Inputs: page_type. Returns: result
list_typesA
List the page types this wiki uses, with counts. Types come from
frontmatter type, falling back to the containing directory.
Inputs: no named parameters. Returns: result
read_pageA
Return a page's full content.
Args: name: Page slug ('grounding-data'), relative path ('sources/2026-04-24-caswell.md'), or a [[wikilink]].
Inputs: name (required). Returns: result
read_sourceA
Return the text of a raw source document (transcript, article, notes). Text files only; PDFs and other binaries are not served as text.
Args: path: Path within the raw source directory.
Inputs: path (required). Returns: result
search_wikiA
Full-text search across the wiki (excludes raw sources). Returns matching files with line snippets. Use find_page instead when you want one page rather than every mention.
Args: query: Search terms (case-insensitive; regex is accepted). page_type: Optional type filter. See list_types.
Inputs: query (required), page_type. Returns: result
validate_wikiA
Check the wiki for conformance problems: invalid or incomplete frontmatter, duplicate slugs, pages missing from the index, index entries pointing at pages that no longer exist, references to missing sources, and unresolved or broken wikilinks.
Args: path: Optional single page to check. Omit to check everything. limit: Maximum findings to return.
Inputs: path, limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Every tool has a distinct purpose. get_index provides an overview, search_wiki and find_page are explicitly differentiated for full-text search vs. single-page retrieval, and read_page, list_pages, list_types, list_tags, get_log, read_source, validate_wiki, and ask each serve unique functions without overlap.
All tool names follow a consistent verb_noun pattern (e.g., get_index, search_wiki, find_page, read_page, list_pages, list_types, list_tags, get_log, read_source, validate_wiki). The only minor deviation is 'ask', but it is still a single verb and fits the pattern of action-oriented names.
With 11 tools, the set is well-scoped. Each tool covers a specific aspect of wiki interaction (index, search, retrieval, listing, logging, raw source access, validation, Q&A) without being excessive or sparse.
The tool set is complete for a read-only wiki interface. It provides everything needed to navigate, search, retrieve, validate, and query a wiki corpus. While write tools are absent, the domain inferred from the tool descriptions is clearly read-only, so no gaps exist.
Maintenance
Related MCP Connectors
Shared project wiki for AI agents: read and write pages, next actions, and activity logs over MCP.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Read and write your team's shared, AI-readable wiki from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceTurns a git-backed markdown directory into an MCP-compatible knowledge server, enabling any MCP client to read, search, ingest, and maintain a persistent wiki that compounds across sessions.MIT
- AlicenseNot gradedqualityAmaintenanceServes local Markdown wikis as a read-only knowledge source with MCP tools for agent context retrieval.60 PyPI9Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides structured search, schema-validated writes, and linting for a markdown knowledge base, enabling agents to operate the wiki over a single streamable-HTTP MCP endpoint.1-
- AlicenseAqualityCmaintenanceServes a local Obsidian markdown vault over MCP, enabling agents to search, read, build context, verify, and safely propose or apply guarded changes to the knowledge base.12MIT