SurrealDB MCP Server
@nsxdavid
关于 SurrealDB MCP Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"surrealdb": {
"command": "npx",
"args": [
"-y",
"surrealdb-mcp-server"
],
"env": {
"SURREALDB_URL": "",
"SURREALDB_NS": "",
"SURREALDB_DB": "",
"SURREALDB_USER": "",
"SURREALDB_PASS": ""
}
}
}
}工具
10Execute a raw SurrealQL query.
Select records from a table (all or by specific ID).
Create a single new record in a table.
Update a specific record, replacing its content.
Delete a specific record by ID.
Merge data into a specific record (partial update).
Apply JSON Patch operations to a specific record.
Create a record if it doesn't exist, or update it if it does.
Insert multiple records into a table.
Create a graph relation (edge) between two records.
概览
What is SurrealDB MCP Server?
A Model Context Protocol server that provides a standardized interface for AI assistants to query and manipulate data within a SurrealDB database. It enables AI systems to perform CRUD operations and run SurrealQL queries against a configured SurrealDB instance.
How to use SurrealDB MCP Server?
Install globally via npm (npm install -g surrealdb-mcp-server) or run on-demand with npx -y surrealdb-mcp-server. Configure the server by setting five environment variables (SURREALDB_URL, SURREALDB_NS, SURREALDB_DB, SURREALDB_USER, SURREALDB_PASS) in your MCP host’s settings file, then restart the host and verify the server appears in the tool list.
Key features of SurrealDB MCP Server
- Execute raw SurrealQL queries via the
querytool. - Perform CRUD operations:
select,create,update,delete,merge. - Use advanced operations:
patch,upsert,insert,insertRelation. - Handles graph relation creation between records.
- Connects to local or cloud SurrealDB instances via WebSocket.
Use cases of SurrealDB MCP Server
- Allow an AI coding assistant to create, read, update, and delete records in a SurrealDB database.
- Enable an AI chatbot to run custom SurrealQL queries for data analysis.
- Let an AI agent insert bulk records or define graph edges between entities.
FAQ from SurrealDB MCP Server
What environment variables are required?
The server needs SURREALDB_URL, SURREALDB_NS, SURREALDB_DB, SURREALDB_USER, and SURREALDB_PASS to connect to a SurrealDB instance.
How do I verify the server is installed correctly?
Ask your MCP host (e.g., Claude, Cline) to “list available MCP servers” – “surrealdb” should appear. If not, check your configuration path and environment variables.
What if I see a “Cannot find module” error?
Ensure the package is globally installed (npm list -g surrealdb-mcp-server) and that the path in your MCP settings matches the actual installation location. Reinstall if needed.
Why am I getting a connection error?
Verify that SurrealDB is running (surreal start --log debug) and that the URL, namespace, database, and credentials are correct and reachable from the server host.
Can I use this server without a global install?
Yes. Using npx -y surrealdb-mcp-server as the command in your MCP configuration automatically downloads and runs the package without a permanent global install.
其他 分类下的更多 MCP 服务器
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
评论