Wikantik exposes two Model Context Protocol
servers so an AI agent can use the wiki directly — searching, traversing the
Knowledge Graph, reading token-budgeted page projections, and (optionally)
curating content. This page is the setup: which URL and which key go in which
file, securely, so a Claude Code
instance
can read — or write — this wiki.
The catch-22. This article explains how to connect an agent to the wiki, but an agent can't read it until it's already connected. So the first connection is a human task: read this directly, wire up Claude Code, and from then on your agent can search, read, and cite this very page — and everything else here — on its own.
| Server | URL | What it's for | Tools |
|---|---|---|---|
| Knowledge MCP (read-only) | https://wiki.wikantik.com/knowledge-mcp | Retrieval: hybrid search, Knowledge-Graph traversal, structural-spine navigation, the get_page_for_agent projection, sparql_query, get_ontology | 18, read-only |
| Admin MCP (write / curate) | https://wiki.wikantik.com/wikantik-admin-mcp | Curation: page writes, KG node/edge curation, proposals, verification stamping | 25 |
Most people want the read-only Knowledge MCP for a coding agent — it can read and reason but can never change anything. Add the Admin MCP only if you want the agent to maintain the wiki (write pages, curate the graph).
Both servers authenticate the same way: an Authorization: Bearer <API_KEY> header.
In the wiki, open /admin/apikeys (you must be logged in as an admin), create a
key, and copy it — it is shown only once. Treat it like a password.
Never commit the key to version control. Pick one of two safe patterns:
~/.claude.json (not version-controlled) and is available in every
project. Best when the key is just yours..mcp.json + env var. Commit a project .mcp.json,
but reference the key through an environment variable (${WIKANTIK_MCP_KEY}). The
config is shared; the secret is not — each teammate sets their own env var.claude mcp add \
--transport http \
--header "Authorization: Bearer YOUR_KEY_HERE" \
--scope user \
wikantik-knowledge \
https://wiki.wikantik.com/knowledge-mcp
To also give the agent write access, repeat with the admin URL and a distinct name:
claude mcp add \
--transport http \
--header "Authorization: Bearer YOUR_KEY_HERE" \
--scope user \
wikantik-admin \
https://wiki.wikantik.com/wikantik-admin-mcp
.mcp.json + env var)Create .mcp.json at your project root. Note "type": "http" (Streamable HTTP)
and the env-var placeholder for the key:
{
"mcpServers": {
"wikantik-knowledge": {
"type": "http",
"url": "https://wiki.wikantik.com/knowledge-mcp",
"headers": { "Authorization": "Bearer ${WIKANTIK_MCP_KEY}" }
}
}
}
Put the actual key in your shell environment — e.g. in ~/.zshrc/~/.bashrc, or in
a .gitignored file you source:
export WIKANTIK_MCP_KEY="your_key_here"
Then start Claude Code (claude) from that shell. Commit .mcp.json; do not
commit the key.
Gotcha: running
claude mcp addagainst a project that already has a.mcp.jsonwill resolve your${WIKANTIK_MCP_KEY}placeholder into the literal key value (a known bug). If that happens, restore the placeholder:
git checkout -- .mcp.json.
claude mcp list # expect: wikantik-knowledge ✓ Connected
claude mcp get wikantik-knowledge
Or, inside a Claude Code session, run the /mcp command to see each server, its
status, and the tools it exposes. A ! Needs authentication or ✗ Failed to connect means the key or URL is wrong.
Now just ask, and the agent reaches the wiki for you:
search_knowledge → get_page_for_agentsparql_queryupdate_page${WIKANTIK_MCP_KEY} env var.claude mcp add can rewrite ${VAR} to the literal key in a project .mcp.json (bug #18692) — restore with git checkout -- .mcp.json.http for these Streamable-HTTP servers — not sse or streamable-http.
— picking the right tool once you're connected
— the principles these servers follow