v0.6.0

MCP Server

Last updated


The Model Context Protocol server that gives agents the list_rag and search_rag tools, over stdio or optionally over HTTP.

Transports


TransportStartProcessNotes
stdiokura mcpSeparate process launched by the MCP clientOpens each registered database's data.db itself and runs no watcher; databases that fail to open are skipped
Streamable HTTPkura remote enableThe running daemon, at <endpoint>/mcpOff by default; the route is decided at daemon startup, so enabling restarts a running daemon

Both transports share one server definition: name kuradb, the server instructions below, and the same two tools. Tool calls go straight to search.Search, so results are identical to the HTTP API.

Client Setup


Claude Code, stdio:
  1. claude mcp add kura -- kura mcp

Any client that reads an mcpServers JSON file, stdio:
  1. {
  2. "mcpServers": {
  3. "kura": { "command": "kura", "args": ["mcp"] }
  4. }
  5. }

Claude Code, HTTP (pin the port first so the URL stays stable):
  1. kura port set 23456
  2. kura remote enable
  3. claude mcp add --transport http kura http://localhost:23456/mcp

The server sends instructions that tell the agent to call list_rag when the database name is unknown, then search_rag, and that the server stores only indexed files, with no conversation history or session memory.

Tool: list_rag


Takes no arguments and returns the same shape as GET /api/list:
  1. { "loaded": ["notes"], "registered": [{ "db": "notes", "createAt": "2026-10-21T07:13:55Z" }] }

Tool: search_rag


ArgumentTypeRequiredRule
dbstringYesTarget database name; surrounding spaces are trimmed
qstringYesSpace-separated keywords; surrounding spaces are trimmed
limitintegerNo1 to 100, default 10; invalid values fall back to 10
modestringNoOnly keyword; case-insensitive, omit to use it

The structured result is {"keyword": [{"source": ..., "matches": [{"chunk": ..., "content": ...}]}]}. When nothing matches, the keyword field is omitted and the result is {}. Validation failures such as an unknown database come back as a tool error with isError: true and a message like invalid argument: "x" not exist.

中文