Surreal MCP Server

MCP server for SurrealDB database

Local serverstdioPython

What is the Surreal MCP Server?

MCP server for SurrealDB database

The short version

The SurrealDB MCP Server bridges the gap between AI assistants and SurrealDB, providing a standardized interface for database operations through the Model Context Protocol. This enables LLMs to:

  • Full SurrealQL Support — Execute any SurrealQL query directly
  • Comprehensive CRUD Operations — Create, read, update, delete with ease
  • Graph Database Operations — Create and traverse relationships between records
  • Bulk Operations — Efficient multi-record inserts
  • Smart Updates — Full updates, merges, and patches
  • Type-Safe — Proper handling of SurrealDB's RecordIDs

What it needs from you

  • SurrealDB instance running locally - Test database access (uses temporary test databases)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Surreal MCP Server

{
  "mcpServers": {
    "surrealdb": {
      "command": "uvx",
      "args": ["surreal-mcp"],
      "env": {
        "SURREAL_URL": "ws://localhost:8000/rpc",
        "SURREAL_USER": "root",
        "SURREAL_PASSWORD": "root",
        "SURREAL_NAMESPACE": "test",
        "SURREAL_DATABASE": "test"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • SurrealDB instance running locally - Test database access (uses temporary test databases)
VariableDescriptionRequired
SURREAL_URLEndpoint or connection string the server talks to.Yes
SURREAL_USERConfiguration value read at startup.Optional
SURREAL_PASSWORDConfiguration value read at startup.Optional
SURREAL_NAMESPACEConfiguration value read at startup.Optional
SURREAL_DATABASEConfiguration value read at startup.Optional

Example prompts to try

  • “Use Surreal MCP to Prerequisites.”

Frequently asked questions

Python 3.10 or higher, a running SurrealDB instance (local or remote), and an MCP-compatible client (e.g., Claude Desktop, MCP CLI).