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": {
"API-KEY": "<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 the API-KEY header — the same as REST. Do not use Authorization: Bearer.

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

Tool schemas: MCP tools reference.

Was this page helpful?