Skip to content

MCP server

Installing the MCP server

Connect SurrealDB Agent Memory to Claude, Cursor, Windsurf, VS Code, and other MCP clients.

SurrealDB Agent Memory serves MCP (Streamable HTTP) at /mcp on the same host and port as the REST API. Point any MCP client at that endpoint:

  • SurrealDB Cloud - your context host from SurrealDB Studio API keys with /mcp appended, for example https://abc123.spectron.cloud/mcp.

  • Self-hosted - your server's base URL plus /mcp, for example http://localhost:9090/mcp.

Authentication uses Authorization: Bearer, the same as REST. Each key is bound to one Context, so context_id is optional on every tool call. The tools map to the unified substrate: remember, recall, context, reflect, forget, upload, inspect.

install-mcp writes the correct config for most clients. Pass the /mcp URL as the first argument, your key with --header, and --oauth no to skip the OAuth prompt (SurrealDB Agent Memory uses a static Bearer key, not OAuth):

npx install-mcp https://<your-context-host>/mcp \
  --client cursor \
  --header "Authorization: Bearer <your-api-key>" \
  --oauth no

Use this for cursor, vscode, windsurf, zed, and opencode. Claude (Code, Cowork, Desktop) and Codex have a dedicated SurrealDB plugin - see the Claude and Codex guides. JetBrains and Antigravity use the manual configuration below.

Any MCP client can be configured by hand:

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

Some clients use a different key or shape - serverUrl in Windsurf and Antigravity, a servers object with a type field in VS Code. The per-client guides show each one.

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

Tool schemas: MCP tools reference.

Was this page helpful?