1. Conduid
  2. Data
  3. Surrealdb MCP Server
MCP server · Data

Surrealdb MCP Server

MCP server: Surrealdb MCP Server

Unclaimed Custom license last commit a year ago data
50Fair

Scored yesterday · breakdown

About Surrealdb MCP Server

Surrealdb MCP Server is an MCP server published by nsxdavid in the Data category: mCP server: Surrealdb MCP Server.

The repository has 39 stars and 11 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/nsxdavid/surrealdb-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (10)

createCreate a single new record in a table.

Parameters not published.

deleteDelete a specific record by ID.

Parameters not published.

insertInsert multiple records into a table.

Parameters not published.

insertRelationCreate a graph relation (edge) between two records.

Parameters not published.

mergeMerge data into a specific record (partial update).

Parameters not published.

patchApply JSON Patch operations to a specific record.

Parameters not published.

queryExecute a raw SurrealQL query.

Parameters not published.

selectSelect records from a table (all or by specific ID).

Parameters not published.

updateUpdate a specific record, replacing its content.

Parameters not published.

upsertCreate a record if it doesn't exist, or update it if it does.

Parameters not published.

Ask AI

✦

Ask AI about Surrealdb MCP Server

Powered by Claude · Grounded in docs

I know everything about Surrealdb MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository yesterday. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.2.0v0.2.0 - SurrealDB Authentication Fix & Compatibility Improvements · 15 Jul 2025🎉 Major Authentication Fix This release resolves critical authentication issues with SurrealDB servers and improves compatibility with SurrealDB 2.x. ✅ What's Fixed Authentication Issues: Fixed SurrealDB authentication pattern to include…
v0.1.10v0.1.10 · 16 Apr 2025What's Changed Fixed logging to ensure all logs are properly redirected to stderr Updated version numbers to be consistent across the codebase Full Changelog https://github.com/nsxdavid/surrealdb-mcp-server/compare/v0.1.9...v0.1.10
v0.1.9v0.1.9 · 11 Apr 2025Improvements Logger output now redirected to daily log files in logs/ directory to prevent stdio stream contamination
v0.1.8SurrealDB MCP Server v0.1.8 · 8 Apr 2025Changes in v0.1.8 Added support for the 'prompts' capability. Implemented handler for 'ListPromptsRequestSchema'. Updated version to 0.1.8.
v0.1.6SurrealDB MCP Server v0.1.6 · 8 Apr 2025New Features Added support for additional AI assistants: Roo Code in VS Code Windsurf Cursor Documentation Improvements Added a note directing AI assistants to the llms-install.md file Enhanced installation instructions for all supported…

README

SurrealDB MCP Server

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.

Note for AI Assistants: If you are an AI assistant (like Claude, Cline, Copilot, etc.) reading this documentation, please refer to the llms-install.md file for detailed instructions specifically designed for you to help users install and configure this MCP server.

Installation Guide

Which AI assistant are you using?

Key Terms

  • MCP Server: A server that implements the Model Context Protocol, allowing AI assistants to access external tools and resources
  • MCP Host: The application (like VS Code with Cline or Claude Desktop) that connects to MCP servers
  • SurrealDB: A scalable, distributed, document-graph database with real-time capabilities

Available Tools

The server exposes the following tools for interacting with SurrealDB:

  • query: Execute a raw SurrealQL query.
  • select: Select records from a table (all or by 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 (partial update).
  • patch: Apply JSON Patch operations to a specific record.
  • upsert: Create a record if it doesn't exist, or update it if it does.
  • insert: Insert multiple records into a table.
  • insertRelation: Create a graph relation (edge) between two records.

(Refer to the MCP host's tool listing for detailed input schemas.)

📝 Cline Installation

One-Click Installation for Cline VS Code Extension

  1. Install the package globally:

    npm install -g surrealdb-mcp-server
    
  2. Add to Cline settings:

    Edit the file at: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

    Add the following configuration:

    {
      "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": []
        }
      }
    }
    

    Important: Replace YOUR_USERNAME with your actual Windows username in the path.

  3. Restart VS Code

  4. Verify Installation:

    • Open Cline in VS Code
    • Ask Cline to "list available MCP servers"
    • You should see "surrealdb" in the list

🖥️ Claude Installation

Installation for Claude Desktop App

  1. Configure Claude Desktop to use the server:

    Edit the Claude Desktop App's MCP settings file:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json

    Add the following configuration:

    {
      "mcpServers": {
        "surrealdb": {
          "command": "npx",
          "args": [
            "-y",
            "surrealdb-mcp-server"
          ],
          "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": []
        }
      }
    }
    

    Note: Using the npx command as shown above means the MCP client will automatically download and run the package from npm when needed. No manual installation is required.

  2. Restart Claude Desktop App

  3. Verify Installation:

    • Ask Claude to "list available MCP servers"
    • You should see "surrealdb" in the list

🤖 Copilot Installation

Installation for GitHub Copilot in VS Code

  1. Create a workspace configuration file:

    Create a file at: .vscode/mcp.json in your workspace

    Add the following configuration:

    {
      "inputs": [
        {
          "type": "promptString",
          "id": "surrealdb-url",
          "description": "SurrealDB URL",
          "default": "ws://localhost:8000"
        },
        {
          "type": "promptString",
          "id": "surrealdb-ns",
          "description": "SurrealDB Namespace"
        },
        {
          "type": "promptString",
          "id": "surrealdb-db",
          "description": "SurrealDB Database"
        },
        {
          "type": "promptString",
          "id": "surrealdb-user",
          "description": "SurrealDB Username"
        },
        {
          "type": "promptString",
          "id": "surrealdb-pass",
          "description": "SurrealDB Password",
          "password": true
        }
      ],
      "servers": {
        "surrealdb": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "-y",
            "surrealdb-mcp-server"
          ],
          "env": {
            "SURREALDB_URL": "${input:surrealdb-url}",
            "SURREALDB_NS": "${input:surrealdb-ns}",
            "SURREALDB_DB": "${input:surrealdb-db}",
            "SURREALDB_USER": "${input:surrealdb-user}",
            "SURREALDB_PASS": "${input:surrealdb-pass}"
          }
        }
      }
    }
    

    Note: This configuration uses VS Code's input variables to securely prompt for and store your SurrealDB credentials.

  2. Verify Installation:

    • Open GitHub Copilot Chat in VS Code
    • Select "Agent" mode from the dropdown
    • Click the "Tools" button to see available tools
    • You should see SurrealDB tools in the list

🦘 Roo Code Installation

Installation for Roo Code in VS Code

  1. Access MCP Settings:

    Click the MCP icon in the top navigation of the Roo Code pane, then select "Edit MCP Settings" to open the configuration file.

  2. Add the SurrealDB MCP Server configuration:

    {
      "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": []
        }
      }
    }
    

    Important: Replace YOUR_USERNAME with your actual Windows username in the path.

  3. Restart VS Code

  4. Verify Installation:

    • Open Roo Code in VS Code
    • Click the MCP icon to see available servers
    • You should see "surrealdb" in the list

🌊 Windsurf Installation

Installation for Windsurf

  1. Install the package globally:

    npm install -g surrealdb-mcp-server
    
  2. Configure Windsurf:

    • Open Windsurf on your system
    • Navigate to the Settings page
    • Go to the Cascade tab
    • Find the Model Context Protocol (MCP) Servers section
    • Click on "View raw config" to open the configuration file (typically at ~/.codeium/windsurf/mcp_config.json)
  3. Add the SurrealDB MCP Server configuration:

    {
      "servers": [
        {
          "name": "surrealdb",
          "command": "node",
          "args": [
            "/path/to/global/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"
          }
        }
      ]
    }
    

    Note: Replace /path/to/global/node_modules with the actual path to your global node_modules directory.

  4. Restart Windsurf

  5. Verify Installation:

    • Open Cascade in Windsurf
    • You should see SurrealDB tools available in the tools list

⚡ Cursor Installation

Installation for Cursor

  1. Install the package globally:

    npm install -g surrealdb-mcp-server
    
  2. Configure Cursor:

    • Open Cursor
    • Go to Settings > Cursor Settings
    • Find the MCP Servers option and enable it
    • Click on "Add New MCP Server"
  3. Add the SurrealDB MCP Server configuration:

    {
      "name": "surrealdb",
      "command": "node",
      "args": [
        "/path/to/global/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"
      }
    }
    

    Note: Replace /path/to/global/node_modules with the actual path to your global node_modules directory.

  4. Restart Cursor

  5. Verify Installation:

    • Open Cursor Chat
    • You should see SurrealDB tools available in the tools list

Required Environment Variables

This server requires the following environment variables to connect to your SurrealDB instance:

  • SURREALDB_URL: The WebSocket endpoint of your SurrealDB instance (e.g., ws://localhost:8000 or wss://cloud.surrealdb.com).
  • SURREALDB_NS: The target Namespace.
  • SURREALDB_DB: The target Database.
  • SURREALDB_USER: The username for authentication (Root, NS, DB, or Scope user).
  • SURREALDB_PASS: The password for the specified user.

Troubleshooting

Common Issues

"Cannot find module" Error

If you see an error like "Cannot find module 'surrealdb-mcp-server'", try:

  1. Verify the global installation: npm list -g surrealdb-mcp-server
  2. Check the path in your configuration matches the actual installation path
  3. Try reinstalling: npm install -g surrealdb-mcp-server

Connection Errors

If you see "Failed to connect to SurrealDB":

  1. Verify SurrealDB is running: surreal start --log debug
  2. Check your connection URL, namespace, database, and credentials
  3. Ensure your SurrealDB instance is accessible from the path specified

Cline-Specific Issues

If the npx approach doesn't work with Cline:

  1. Always use the global installation method for Cline
  2. Specify the full path to node.exe and the installed package
  3. Make sure to replace YOUR_USERNAME with your actual Windows username

Advanced Configuration

Using a Local Build

If you've cloned the repository or want to use a local build, you can use this configuration:

{
  "mcpServers": {
    "surrealdb": {
      "command": "node",
      "args": ["/path/to/your/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": []
    }
  }
}
  • Replace /path/to/your/surrealdb-mcp-server with the actual path where you cloned the repository
  • Replace the environment variable values with your actual SurrealDB connection details

Development

If you want to contribute to the development of this MCP server, follow these steps:

Local Development Setup

  1. Clone the repository:

    git clone https://github.com/nsxdavid/surrealdb-mcp-server.git
    cd surrealdb-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Running Locally

# Ensure required SURREALDB_* environment variables are set
npm run dev # (Note: dev script uses ts-node to run TypeScript directly)
# Or run the built version:
npm start

Testing

npm test # (Note: Tests need to be implemented)

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Integration with n8n

You can integrate this SurrealDB MCP Server with n8n using the n8n-nodes-mcp community node.

NOTE: Currently only the self-hosted (Docker) version of n8n supports community nodes. There is no option for MCP Servers in the n8n cloud version (yet?).

Installation

  1. Install the n8n-nodes-mcp package:

    npm install n8n-nodes-mcp
    
  2. Configure n8n to use the custom node:

    Add the following to your n8n configuration:

    N8N_CUSTOM_EXTENSIONS="n8n-nodes-mcp"
    
  3. Configure the MCP node in n8n:

    • Add the "MCP" node to your workflow
    • Configure it to connect to your SurrealDB MCP Server
    • Select the desired operation (query, select, create, etc.)
    • Configure the operation parameters

For more details, visit the n8n-nodes-mcp GitHub repository.

License

MIT

README fetched from the repository yesterday. The original is authoritative.

Questions

About Surrealdb MCP Server

How do I install Surrealdb MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Surrealdb MCP Server safe to use with an AI agent?

Its trust score is 50 out of 100 (fair). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Surrealdb MCP Server still maintained?

The last commit was a year ago and 5 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.