Docs

Kept's local API and MCP server

Other apps and AI tools on the Mac that runs Kept can ask Kept questions, search its sources and list them. It's read-only: nothing can add, change or delete documents this way.

Set up a tool

Claude Code:

claude mcp add --transport http kept http://127.0.0.1:47822/mcp \
  --header "Authorization: Bearer YOUR_KEY"

Cursor (.cursor/mcp.json) and other tools that take an mcpServers file:

{
  "mcpServers": {
    "kept": {
      "url": "http://127.0.0.1:47822/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

MCP

Endpoint: http://127.0.0.1:47822/mcp. Streamable HTTP with JSON responses, stateless: no event stream and no session IDs. Kept speaks both protocol eras:

Tools

ToolInputReturns
askquestion (string, up to 2,000 characters)kind (grounded or notFound), answer with [n] markers, optional notice, and citations (number, source, category, pageStart, pageEnd, quote)
searchquery, optional limit 1–20 (default 6)passages (source, category, pages, heading, text, relevance 0–1), best first
list_sourcesnonesources (id, name, type, category, status, pages, addedAt)

All three are read-only and return structuredContent matching their outputSchema. Problems a model can act on (an empty question, an ended licence, the AI engine not running, the rate limit) come back as tool results with isError: true. An unknown tool is -32602.

HTTP API

Base URL http://127.0.0.1:47822/v1. JSON in and out; errors are {"error": "…"} with a status code.

RequestBodyResponse
GET /v1/statusapp, version, business, sources, chatModel, license, canAsk
GET /v1/sources{"sources": […]}, as in list_sources
POST /v1/search{"query": "…", "limit": 6}{"passages": […]}, as in search
POST /v1/ask{"question": "…"}As in ask
curl http://127.0.0.1:47822/v1/ask \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question": "How do I request leave?"}'

Status codes: 400 bad input, 401 missing or unknown key, 402 licence ended, 403 turned off, wrong Host or a website's Origin, 405 wrong method, 429 rate limit, 503 Kept's AI isn't set up or its engine isn't running. Questions asked through the API aren't added to Kept's own history.

Security notes