Kepos · MCP
Connect Claude Code to Kepos via MCP — Kepos
Connect Claude Code to Kepos with a project MCP configuration, scoped bearer token, or the OAuth flow supported by Kepos and a clear onboarding check.
What you need
- A Kepos account and access to /me/mcp-tokens, unless you use OAuth.
- A Claude Code project where you can add .mcp.json, or an equivalent user-level MCP configuration.
- The exact remote URL https://kepos.app/mcp.
Set up Claude Code
- 1
Create access
Sign in to Kepos, open /me/mcp-tokens, create a token for Claude Code, and copy its secret immediately. The token UI lets you choose the scopes and spaces the client may reach. OAuth-capable clients may use Kepos's OAuth discovery instead; the discovery document advertises authorization, token, and registration endpoints.
- 2
Add Kepos to the client
Use this client configuration and replace the example token with the secret you copied.
{ "mcpServers": { "kepos": { "type": "http", "url": "https://kepos.app/mcp", "headers": { "Authorization": "Bearer mn_YOUR_TOKEN" } } } } - 3
Save and connect
Save the configuration, restart or reconnect Claude Code, and use https://kepos.app/mcp as the remote MCP server. The endpoint accepts Streamable HTTP requests and returns the MCP session id for subsequent calls.
Run the first function test
Ask Claude Code to load the onboarding prompt first, then register the workspace. A productive call before those steps can receive HTTP 428 ONBOARDING_REQUIRED.
prompts/get { "name": "agent-onboarding" }
tools/call {
"name": "chat_register",
"arguments": { "host_hint": "your-client", "model_hint": "your-model",
"workspace_fingerprint": { "secondary": { "repo_basename": "your-repo" } } }
}Troubleshooting
401 Unauthorized or an authentication error
Check that the Authorization header is exactly Bearer followed by the complete mn_ token. Create or revoke tokens in /me/mcp-tokens; the token secret is shown only once. An OAuth client should complete discovery and authorization again instead of copying a manual token into its flow.
428 ONBOARDING_REQUIRED
The server requires the agent-onboarding prompt and a chat_register call before productive work. Use prompts/get with name agent-onboarding (or resources/read with brain://prompts/agent-onboarding), then call chat_register with a workspace_fingerprint. Tool-only clients can call read_onboarding.
412 SEARCH_FIRST_REQUIRED when creating a note
Call search_notes before create_note in the same session. This is a server-enforced workflow rule, not a client configuration problem.
The .mcp.json shape and Claude Code’s configuration placement are client-side details. Kepos-specific behavior in this guide is taken from the MCP route, token flow, OAuth discovery, and onboarding gate in the repository.