SurrealDB MCP Server

SurrealDB MCP Server is an MCP server that provides an interface for AI assistants to interact directly with a SurrealDB database instance. Built on the Model Context Protocol TypeScript SDK, it connects language model clients to SurrealDB's multi-model document-graph database engine. Software engineers, database administrators, and AI developers use this server to inspect schemas, execute ad-hoc database queries, and manipulate live datasets straight from their coding environments. By exposing standard database operations as MCP tools, the server enables connected clients to run raw SurrealQL statements, retrieve records by ID or table, create new documents, update or patch existing entries, and manage graph edges between records. The integration handles database connection management through standard environment variables, allowing developers to automate data inspection, perform data migrations, run semantic queries, and test database-backed application workflows without switching away from their primary development assistant.

Category: Databases & Data Stores

Tags: database, multi-model, nosql, surrealdb

Visit SurrealDB MCP Server

How to install and configure SurrealDB MCP Server

  1. Configure your MCP client settings file, such as claude_desktop_config.json for Claude Desktop or .vscode/mcp.json for Copilot. 2. Add the surrealdb server configuration using npx to execute the package directly: json { "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" } } } } 3. Alternatively, install globally using npm install -g surrealdb-mcp-server and point your client configuration to the built index.js file using node. 4. Restart your MCP client and ask the assistant to list tools to verify the connection.

What you can do with SurrealDB MCP Server

  • Executing raw SurrealQL queries directly from AI chat sessions to inspect tables, test database functions, and analyze data distributions. - Inserting or upserting individual and batch document records during development, prototyping, and automated test data seeding workflows. - Establishing graph relations between existing database entities using the dedicated relation insertion tool to model interconnected application datasets. - Updating, merging, or applying granular JSON Patch operations to existing SurrealDB records without writing manual query scripts.

Key facts

  • Open Source
  • https://github.com/nsxdavid/surrealdb-mcp-server
  • Databases & Data Stores
  • database, multi-model, nosql, surrealdb

Part of MCP Servers

Related MCP servers

  • MCP Memory Keeper β€” MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes β€” MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server β€” MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Memory Toolkit β€” MCP Memory Toolkit is an MCP server that provides persistent memory capabilities for Claude and other compatible assistants using ChromaDB.…
  • MCP Memory Server β€” MCP Memory Server is an MCP server that integrates Claude Desktop with Azure Cosmos DB and OpenAI embeddings to provide…
  • MCP MS SQL Server β€” MCP MS SQL Server is an MCP server that provides a standardized Model Context Protocol interface for AI models to…

How do I install SurrealDB MCP Server?

You can run it on demand with npx by configuring your client to execute surrealdb-mcp-server with the -y flag. Alternatively, install it globally using npm install -g surrealdb-mcp-server and point your MCP client to the built index.js file. Provide your database credentials and endpoint details using the SURREALDB_URL, SURREALDB_NS, SURREALDB_DB, SURREALDB_USER, and SURREALDB_PASS environment variables.

What can SurrealDB MCP Server do?

The server exposes tools to execute raw SurrealQL queries and handle standard document and graph operations. These include selecting records, creating new documents, replacing or updating data, merging fields, applying JSON Patch updates, upserting, deleting records by ID, inserting multiple records simultaneously, and creating graph relation edges between records.

Which MCP clients work with SurrealDB MCP Server?

It works with any MCP-compliant client that supports stdio transport. Tested clients documented in the project repository include Claude Desktop, Cursor, GitHub Copilot in VS Code, Cline, Roo Code, Windsurf, and automation tools like n8n.

Is SurrealDB MCP Server open source?

Yes, SurrealDB MCP Server is open source and distributed under the MIT license. You can inspect its source code, contribute changes, or file issues on its GitHub repository at https://github.com/nsxdavid/surrealdb-mcp-server.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories