compile_wiki, query_wiki, get_context_pack, and more - and receive typed JSON results they can reason over. Start with wiki_status, then get_context_pack to retrieve evidence for your own reasoning without provider credentials. Use generation or write tools only when the task needs them.
This guide walks you through starting the server, wiring it into Claude Desktop and Cursor, and understanding exactly what your agents can do once connected.
Prerequisites
- Node.js 24 or later on the MCP client’s
PATH - llmwiki installed globally:
npm install -g llm-wiki-compiler - A wiki project directory (or an empty directory where one will be created)
- An LLM provider configured for tools that need one (see the provider configuration docs for
ANTHROPIC_API_KEY,OPENAI_API_KEY, etc.)
Setup
1
Start the MCP server
Run The process stays running and speaks the MCP protocol over stdin/stdout. Your MCP client manages the lifecycle.
llmwiki serve from anywhere, pointing --root at your wiki project directory. The server uses stdio transport and requires no credentials at startup - read-only tools work immediately.2
Add to Claude Desktop
Open your Claude Desktop MCP configuration file (Restart Claude Desktop after saving the file. The llmwiki tools will appear in Claude’s tool picker.
claude_desktop_config.json) and add an llmwiki entry under mcpServers. The npx invocation launches the server on demand - you do not need to keep a separate terminal session open.3
Add to Cursor
Cursor uses the same MCP config format. Add the same JSON block to your Cursor MCP settings file. The
env block is where you supply provider credentials - Cursor passes them through to the server process.4
Verify with wiki_status
Ask Claude or your Cursor agent to call
wiki_status. This tool is read-only and requires no credentials, so it works immediately and confirms the server is connected.A successful response looks like:What agents can do
Tools
The server exposes the tools below. Provider requirements are separate from write permissions: ingestion and OKF exchange can write files without an LLM provider.get_context_pack vs query_wiki: these tools serve different purposes. get_context_pack packages evidence - it assembles a structured JSON envelope of relevant pages, semantic chunks, and citations that the agent uses for its own reasoning. query_wiki generates an answer - it calls the LLM and returns prose. Use get_context_pack when the agent needs grounded source material to reason over; use query_wiki when you want a finished answer.
query_wiki and search_pages fall back to selecting pages without embeddings when the embedding call fails, and report it as an embedding-degraded warning in the result instead of failing. query_wiki’s pageIds and refs name only pages whose content reached the answer model; a selected page that can’t be read is named in a page-hydration-dropped warning.
query_wiki has no review option. Its existing no-save path returns the answer and advisory citations without publication checks. See publication policy and recovery before using save: true.
MCP resources
Resources are passive read views of the wiki that agents can attach as context without calling a tool. All resources are read-only.Credentials per tool call
The server starts without credentials. Provider credentials are read from theenv block in your MCP config and forwarded to each pipeline call:
- Read-only and filesystem-only tools (
read_page,lint_wiki,wiki_status,ingest_source,export_okf,import_okf) - do not need provider credentials; normal path, project, and policy checks still apply. - LLM-dependent tools (
compile_wiki,query_wiki,search_pages) - require a valid provider credential (ANTHROPIC_API_KEY,OPENAI_API_KEY, etc.) in the environment at call time. get_context_pack- credential-free by default. When embeddings are available and provider credentials are present, semantic retrieval is used. Without credentials or an embedding store, the tool falls back to lexical ranking and surfaces anembedding-store-missingorquery-embedding-unavailablewarning in the response - it does not fail.run_eval- thefastsuite (health score, citation coverage, corpus stats) runs without any credentials. Thefullsuite adds LLM-judged citation scoring and requires a provider.
get_context_pack details
get_context_pack accepts several optional parameters for tuning the evidence pack:
prompt(required) - the task or question to assemble context forbudget- approximate output token budget (default 8 000)depth- graph neighborhood traversal depth,0–2(default1;0disables graph expansion)topPages- maximum primary pages to include (default5, max20)topChunks- maximum semantic chunks to surface (default8, max50)includeSources(opt-in) - whentrue, materializes raw source line windows from claim-level citations
includeSources is opt-in because it returns raw content from files under sources/. Path confinement prevents reads outside sources/, but only enable source windows for agents you trust with the ingested source text.
Using ingest_source safely
ingest_source accepts a URL or an absolute local file path. Because it performs a server-side fetch and local file read, it is a trusted-input-only primitive - pass only URLs and paths you control. For untrusted or user-supplied content, use the SDK’s ingestText instead (see the SDK guide).
OKF tools
export_okf and import_okf give agents structured Open Knowledge Format access without parsing CLI output.
export_okfwrites an OKF bundle. Its optionaloutpath is confined under the project root.import_okfreads an OKF bundle from a project-confineddir. It supportsdryRunand is always staging-only; MCP does not expose the trusted live-write import path.- After
import_okfstages pages, approve them withllmwiki review list,llmwiki review show, andllmwiki review approve.
Agent skill
The npm package ships an Agent Skills skill atskills/llmwiki/SKILL.md. It tells a skill-aware agent when a persistent wiki is worth building, and routes a connected agent to wiki_status and get_context_pack before any tool that writes or needs a provider. Copy or symlink the installed directory into your agent’s skills directory; for Claude Code that is ~/.claude/skills/:
llmwiki review.
Next steps
- See CLI reference: llmwiki serve for all server flags and transport options.
- For programmatic in-process control from TypeScript, see the SDK guide.