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.
Generate config
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 mcpThe command prints an mcpServers JSON block for Claude Desktop, Cursor, and Claude Code, plus a claude mcp add one-liner where applicable.
Example configuration
{
"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.
Per-client guides
MCP vs SDK
| Situation | Use |
|---|---|
| Coding assistant with native MCP | spectron mcp config |
| Application code (Python/TS) | surrealdb / @surrealdb/spectron |
| Agent framework with harness adapter | spectron-integration-crewai, @surrealdb/vercel-ai, … |
| Custom infrastructure | REST API |
Tool schemas: MCP tools reference.