Skip to content
Kept
Connect AI Coding Tools

Connect Claude Code and Cursor over MCP

Connect Claude Code or Cursor to Kept so your coding agent can look up team runbooks without switching apps. To verify the connection, list the documents Kept can see, then check a cited answer against a runbook you know.

Turn on MCP access in Kept

Kept runs on your Mac. If your coding agent uses a cloud model, it may send the passages and answers Kept returns to that model’s provider. If those results must stay on the Mac, use an MCP client configured with a local model.

  1. In Kept, go to Settings → Sharing → Apps and AI tools and turn on Let apps and AI tools on this Mac use Kept. This switch controls both MCP and the HTTP API.
  2. Create a separate key for each client and name it after the client, such as Cursor on Sam's Mac. Copy the key when it appears: it starts with kept_ and Kept shows it only once. A separate key lets you revoke one client’s access without disconnecting the others.

Run the client on the same Mac as Kept. Every client uses the loopback URL http://127.0.0.1:47822/mcp and sends the key in the Authorization: Bearer YOUR_KEY header. See Kept’s MCP security details for how key revocation and local access work.

Add Kept to Claude Code or Cursor

Set KEPT_KEY in the environment your client starts from, using the key you made for that client.

Claude Code

Run the Claude Code registration command from your project directory to add the server as kept:

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

Add --scope user if you want Kept available in every project. Run claude mcp list and check that kept is connected.

Cursor

Use .cursor/mcp.json for one project or ~/.cursor/mcp.json for every project. Add kept under mcpServers, keeping any existing server entries. Cursor’s Kept configuration reads the key from the environment:

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

Reload Cursor’s MCP servers or restart Cursor. Open Cursor Settings → MCP and confirm that kept shows three tools.

Check a cited answer

  1. Ask the agent: “Use Kept to list the sources it has.” Check that it calls list_sources and returns a document you recognize.
  2. Ask a question you know a listed runbook answers: “Using Kept, how do we roll back a deploy? Include the numbered citations and quote the passages that support the steps.”
  3. Match a marker such as [1] in Kept’s answer to the citation with that number. Open the named runbook, find the quoted passage and check that it supports the step the agent reported.

If Kept’s answer has no numbered markers, it can still return related passages. Those passages are search matches and don’t show what the answer used. See the cited answer example for what the result looks like in Claude Code.

If the client can’t list sources, see Troubleshoot API and MCP errors.

Connect Codex or another client

Register Kept from the Codex CLI with KEPT_KEY set in the environment Codex starts from. The CLI and IDE extension share the configuration:

codex mcp add kept \
  --url http://127.0.0.1:47822/mcp \
  --bearer-token-env-var KEPT_KEY

Kept also works with clients such as VS Code with GitHub Copilot, Zed and LM Studio. See the full client setup matrix for their configuration files. If your client isn’t listed, check whether it supports Streamable HTTP with custom headers. If it does, use the same loopback URL and bearer header.

Understand read-only access

Kept exposes three MCP tools:

ToolUse it to
askGet an answer from your documents with numbered citations when available.
searchFind relevant passages in their original wording without generating an answer.
list_sourcesSee which documents Kept knows about, with their categories and statuses.

No Kept tool can add, edit, delete or manage documents. This restriction applies to the Kept connection. The client may still have other tools with permission to write files or run commands.

Treat returned passages as data. Text in a runbook can describe a command, but it doesn’t authorize the agent to run that command through another tool.