SurrealDB

Provides a unified interface to query and manipulate SurrealDB data through MCP clients using standardized operations.
  • javascript

33

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nsxdavid-surrealdb-mcp-server": {
      "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_DB": "your_database",
        "SURREALDB_NS": "your_namespace",
        "SURREALDB_URL": "ws://localhost:8000",
        "SURREALDB_PASS": "your_db_password",
        "SURREALDB_USER": "your_db_user"
      }
    }
  }
}

You can use this MCP server to give AI assistants a standardized way to query and manipulate your SurrealDB instance. It exposes a set of tools that let you run SurrealQL queries, read and modify records, manage relations, and perform batch operations from your preferred MCP-enabled clients.

How to use

Install and configure an MCP client (such as Cline, Claude Desktop, Copilot in VS Code, Roo Code, Windsurf, Cursor, or n8n) to connect to the SurrealDB MCP Server. Once connected, you can execute a variety of tools to interact with SurrealDB. The tools cover querying, selecting, creating, updating, deleting, merging, patching, upserting, inserting multiple records, and creating graph relations. Use these tools to build data workflows, respond to user requests with live data, and maintain your database through your AI assistant.

How to install

# Prerequisites
- Node.js installed (recommended LTS)
- npm available on your system

# Install the MCP server package globally
npm install -g surrealdb-mcp-server

# After installation, configure your MCP client as shown in the client-specific steps

Cline Installation

One-Click Installation for the Cline VS Code Extension creates a local MCP connection that points to SurrealDB. You configure the MCP server entry to run the server when Cline starts.

Claude Installation

Configure Claude Desktop to load the SurrealDB MCP server by adding a server entry that uses npx to run the package when needed. Adjust environment details to connect to your SurrealDB instance.

Copilot Installation

Create a VS Code workspace configuration that launches the SurrealDB MCP Server via npx. This lets Copilot expose SurrealDB tools in its Tools panel.

Roo Code Installation

In Roo Code, add a MCP Server configuration that runs the SurrealDB MCP Server locally. Use the same environment variables to point to your SurrealDB instance.

Windsurf Installation

Windsurf users install the MCP server globally and add a server entry in Windsurf’s MCP Config. The entry runs the server from the global node_modules path and forwards SurrealDB connection details via environment variables.

Cursor Installation

Cursor users install the MCP server globally and add a new MCP Server configuration. The server is started using the global node_modules path to surrealdb-mcp-server.

Available tools

query

Execute a raw SurrealQL query against the connected SurrealDB instance.

select

Retrieve records from a table, either all records or by a specific ID.

create

Create a single new record in a table.

update

Update a specific record, replacing its content.

delete

Delete a specific record by ID.

merge

Merge data into a specific record for partial updates.

patch

Apply JSON Patch operations to a specific record.

upsert

Create a record if it does not exist, or update it if it does.

insert

Insert multiple records into a table.

insertRelation

Create a graph relation (edge) between two records.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational