Surrealdb MCP Server

A Model Context Protocol (MCP) server that provides a standardized interface for AI assistants to interact with a SurrealDB database.

Remote serverstreamable-httpTypeScript

What is the Surrealdb MCP Server?

Surrealdb mcp server connects Surrealdb to AI assistants that speak the Model Context Protocol. A Model Context Protocol (MCP) server that provides a standardized interface for AI assistants to interact with a SurrealDB database.

What Surrealdb does

A Model Context Protocol (MCP) server that provides a standardized interface for AI assistants to interact with a SurrealDB database. This server enables AI systems to query and manipulate data within a configured SurrealDB instance.

Practical notes

  • Maintained by nsxdavid, written in TypeScript.

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.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
queryExecute a raw SurrealQL query.
selectSelect records from a table (all or by specific ID).
createCreate a single new record in a table.
updateUpdate a specific record, replacing its content.
deleteDelete a specific record by ID.
mergeMerge data into a specific record (partial update).
patchApply JSON Patch operations to a specific record.
upsertCreate a record if it doesn't exist, or update it if it does.
insertInsert multiple records into a table.
insertRelationCreate a graph relation (edge) between two records.

How to install the Surrealdb MCP Server

{
  "mcpServers": {
    "surrealdb": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": [
        "C:\\Users\\YOUR_USERNAME\\AppData\\Roaming\\npm\\node_modules\\surrealdb-mcp-server\\build\\index.js"
      ],
      "env": {
        "SURREALDB_URL": "ws://localhost:8000",
        "SURREALDB_NS": "your_namespace",
        "SURREALDB_DB": "your_database",
        "SURREALDB_USER": "your_db_user",
        "SURREALDB_PASS": "your_db_password"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
SURREALDB_URLDeclared in the maintainer’s client configuration.Check documentation
SURREALDB_NSDeclared in the maintainer’s client configuration.Check documentation
SURREALDB_DBDeclared in the maintainer’s client configuration.Check documentation
SURREALDB_USERDeclared in the maintainer’s client configuration.Check documentation
SURREALDB_PASSDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Surrealdb to query.”
  • “Use Surrealdb to select.”
  • “Use Surrealdb to create.”

Frequently asked questions

A Model Context Protocol (MCP) server that provides a standardized interface for AI assistants to interact with a SurrealDB database. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.