MCP server

Installing the MCP server

Connect Spectron to Claude, Cursor, Windsurf, VS Code, and other MCP clients.

Spectron serves MCP (Streamable HTTP) at /mcp on the same host and port as the REST API (default http://localhost:9090/mcp). Tools map to the unified substrate: remember, recall, documents, reflect, and related operations.

Run on a machine that has the spectron CLI and your env vars set:

export SPECTRON_URL=http://localhost:9090
export SPECTRON_API_KEY=<context-key>
export SPECTRON_CONTEXT_ID=<context-id>

spectron mcp

The command prints an mcpServers JSON block for Claude Desktop, Cursor, and Claude Code, plus a claude mcp add one-liner where applicable.

{
  "mcpServers": {
    "spectron": {
      "url": "http://localhost:9090/mcp",
      "headers": {
        "Authorization": "Bearer <your-context-api-key>"
      }
    }
  }
}

Context is usually encoded in the key or passed per tool; follow the snippet spectron mcp prints for your client version.

Authentication uses Authorization: Bearer, the same as REST. Run spectron mcp to print an install snippet with the correct headers.

SituationUse
Coding assistant with native MCPspectron mcp config
Application code (Python/TS)surrealdb / @surrealdb/spectron
Agent framework with harness adapterspectron-integration-crewai, @surrealdb/vercel-ai, …
Custom infrastructureREST API

Tool schemas: MCP tools reference.

Was this page helpful?