Choose a mode
The MCP server runs with one of two backends and one of two transports.- In-process opens the directory directly. Use it for a single local agent.
- Proxy talks to a running KiwiFS server over REST, so the agent shares the server’s index, live events, and auth. Use it when the web UI or other agents work on the same knowledge base.
kiwifs servealways mounts Streamable HTTP MCP at/mcpon the main port, next to the REST API. No extra process or flag is needed.
Terminal
--root and --remote are mutually exclusive, and exactly one is required. --space only applies with --remote. --port (default 8181) requires --http. See kiwifs mcp for every flag.
Authentication
- Proxy mode sends
--api-keyto the server asAuthorization: Bearer <key>. - HTTP transport requires
Authorization: Bearer <key>when the knowledge base’s.kiwi/config.tomlsets[auth] type = "apikey". The key is[auth] api_key. Without API-key auth, the HTTP endpoint is open.
Connect a client
- Claude Code
- Claude Desktop
- Cursor
- Windsurf
- Any HTTP client
Terminal
.mcp.json at the project root with the same mcpServers block shown in the Cursor tab.First calls
A good session starts withkiwi_context. It returns the schema, agent playbook, index, and rules in one call. From there:
- Find pages with
kiwi_brief(one token-budgeted context pack) orkiwi_search_hybrid. - Skim with
kiwi_peekbefore paying for a fullkiwi_read. - Write with
kiwi_write, passingif_match(the ETag fromkiwi_read) so you never overwrite someone else’s edit. - Verify with
kiwi_lint.
actor (default mcp-agent) that is recorded in the git commit.
Tool reference
The server registers 78 tools. Every name is invoked exactly as listed. Parameters marked with* are required.
Files: read, write, and history (13)
Files: read, write, and history (13)
Search and retrieval (6)
Search and retrieval (6)
Context and structured queries (4)
Context and structured queries (4)
Links and graph (8)
Links and graph (8)
Restructuring (4)
Restructuring (4)
Move, merge, split, retag, and edit many pages in one reviewed commit without breaking links. See Restructuring.
Analytics, health, and activity (5)
Analytics, health, and activity (5)
Import, capture, and export (6)
Import, capture, and export (6)
Tasks and claims (6)
Tasks and claims (6)
Workflows (5)
Workflows (5)
Draft spaces (7)
Draft spaces (7)
Saved views (5)
Saved views (5)
Canvas (3)
Canvas (3)
Canvas generate, patch, query, and auto-layout are REST-only. See Canvas API.
Memory (3)
Memory (3)
Resources
Read-only MCP resources:Related
Restructuring
Move and merge pages without breaking links.
Agent interface
How MCP fits next to REST and filesystem mounts.
Agent playbook
What
kiwi_context returns and how to steer agents.CLI: kiwifs mcp
Every flag for the MCP server command.