Connect AI agents to your wiki
Docs · Model Context Protocol
What this is
Wikai exposes your wiki as a remote Model Context Protocol (MCP) server, so the AI agents you already use — Claude Code, Cursor, or agents you build yourself — can search and read your pages as grounded context while they work. Access is read-onlyand scoped to exactly one workspace, and no LLM runs on our side: your agent's model does the reasoning, Wikai just serves the knowledge.
The server lives at a single endpoint:
https://wikai.wiki/api/mcpMCP access is included in the Pro and Ultra plans. On the Free plan the endpoint returns a 403 — you can upgrade at wikai.wiki/upgrade.
1. Generate an API token
Workspace owners can create tokens in the app: open the user menu (your avatar, top right), choose API tokens, and click Generate token. Copy the token right away — for security it is shown only once, and we store just a hash of it.
Tokens look like wk_... and can be revoked from the same menu at any time. Revocation is immediate: the next request with a revoked token gets a 401.
2. Connect your client
Every MCP-capable client works the same way: point it at the endpoint and send your token as a bearer token in the Authorization header. Replace wk_YOUR_TOKEN in the examples below with your real token.
Claude Code
One command in your project or with --scope user for all projects:
claude mcp add --transport http wikai https://wikai.wiki/api/mcp \
--header "Authorization: Bearer wk_YOUR_TOKEN"Cursor
Add the server to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):
{
"mcpServers": {
"wikai": {
"url": "https://wikai.wiki/api/mcp",
"headers": {
"Authorization": "Bearer wk_YOUR_TOKEN"
}
}
}
}Claude API (agents you build)
The Messages API's MCP connector lets Claude call your wiki directly, without you hosting any MCP plumbing. Declare the server in mcp_servers and reference it from an mcp_toolset entry in tools:
{
"model": "claude-opus-4-8",
"max_tokens": 16000,
"mcp_servers": [
{
"type": "url",
"url": "https://wikai.wiki/api/mcp",
"name": "wikai",
"authorization_token": "wk_YOUR_TOKEN"
}
],
"tools": [
{ "type": "mcp_toolset", "mcp_server_name": "wikai" }
],
"messages": [
{ "role": "user", "content": "What is our incident response process?" }
]
}The MCP connector is in beta and requires the beta header anthropic-beta: mcp-client-2025-11-20 (in the SDKs, pass betas: ["mcp-client-2025-11-20"] on client.beta.messages.create).
Any MCP SDK or client
The server speaks the standard MCP Streamable HTTP transport — connect any MCP SDK to https://wikai.wiki/api/mcp and send the Authorization: Bearer wk_... header on every request. The server is stateless: each JSON-RPC message is a single POST, there is no session to maintain, and there is no SSE notification stream (GET returns 405).
If you're making raw HTTP requests rather than using an SDK, note that the transport spec requires every POST to accept both response types — send Accept: application/json, text/event-stream or the server responds with a 406.
3. What your agent can do
search_wiki(query)— find pages relevant to a question; returns each match's id, title, space, freshness, and a snippet.get_page(id)— read one page in full, as markdown.list_pages()— an id/title/space overview of every page in the wiki, useful for orientation.
That's the whole surface. The typical flow is search → read: the agent calls search_wiki to find candidates, then get_page on the ones that matter.
Security & limits
- A token is full read access to its workspace.Treat it like a password: keep it in a secret manager or your client's config, never in a repository.
- Workspace-scoped. Each token is bound to exactly one workspace and can never read another.
- Hashed at rest, shown once.We store only a hash of your token, so it can't be recovered later — generate a new one if it's lost.
- Immediate revocation. Revoking a token in the API tokens menu cuts off access on the very next request.
- Read-only.There are no write, edit, or delete tools — agents can't change your wiki through MCP.
- Rate limit: 60 requests per minute per token. Beyond that you get a 429 with a
Retry-Afterheader. - No server-side LLM.MCP requests never invoke a model on Wikai's side — your agent's model does the reasoning, we only serve retrieval.
Ready to connect?
MCP access is part of Pro and Ultra. On the Free plan, upgrade your workspace to start connecting agents — or create your wiki first if you're new here.