Knowledge API & MCP · Reference

MCP overview

How the MCP server exposes Chiron to any agent, and how it authenticates.

The Chiron MCP server exposes the platform — projects, tasks, code analysis, the Ontology Layer, databases, and memory — to any Model Context Protocol client. It is how an agent in Claude, Cursor, or your own harness calls the same operations documented in this reference.

Transports

  • stdio — the server is launched by the client as a subprocess. Auth comes from the MCP_AUTH_TOKEN environment variable or the authenticate tool.
  • Streamable HTTP — the server runs as an HTTP service (default port 3001); each connection is a session identified by an mcp-session-id header, carrying its own auth state.

Authentication

An MCP client authenticates its *user* with a bearer token — passed as an Authorization: Bearer header, via the MCP_AUTH_TOKEN env var, or through the browser-based authenticate tool, which returns a sign-in URL and stores the token on the session after callback.

Internally the server calls the Ontology Layer with the service key, not the user's token, because the Ontology Layer validates service keys (Authentication). Your access to a project is enforced *before* that service call — the project_id you pass is checked against what your user can see.

Configuration

Point a client at the server and set the backend URLs it proxies to:

jsonc
// .mcp.json
{
  "mcpServers": {
    "chiron": { "type": "http", "url": "http://localhost:3001" }
  }
}
bash
# server-side environment
ONTOLOGY_LAYER_URL=http://localhost:3020
BACKEND_URL=http://localhost:3000
WORKSPACES_BACKEND_URL=http://localhost:3013
MEMORY_BACKEND_URL=http://localhost:3016
INTERNAL_SERVICE_KEY=...            # used for X-API-Key calls to the Ontology Layer
AUTH_FRONTEND_URL=http://localhost:3001
# optional feature flags
ONTOLOGY_ENABLE_RAW_SQL=true        # expose run_sql
ONTOLOGY_ENABLE_CONNECT_DATABASE=false

The full walkthrough for a specific editor is Wire up MCP in your editor. The tools themselves are catalogued next.

Next: MCP tool catalog.