SurrealDB MCP for AI agents: built-in server (SurrealDB 3.1+ `surreal mcp`) and standalone surrealmcp (surrealdb/surrealmcp v0.4.0). Part of the surreal-skills collection.
Two MCP surfaces exist as of SurrealDB 3.1:
| Surface | When to use |
|---|---|
| Built-in (surreal mcp, HTTP /mcp) | Local IDE hosts; simplest setup with the main surreal binary |
| Standalone (surrealmcp start) | Extended tool catalog, cloud helpers, multi-endpoint switching |
# stdio — typical MCP host config
surreal mcp --endpoint ws://127.0.0.1:8000/rpc --ns test --db test \
--user root --pass root
Security: stdio MCP grants owner-level tool access with no login step. Do not
expose to untrusted hosts. HTTP /mcp requires normal SurrealDB authentication.
See rules/surrealmcp.md for env vars and tool hints.
Not published to crates.io or npm. Install from source or Docker:
git clone https://github.com/surrealdb/surrealmcp
cd surrealmcp && cargo install --path .
# Or Docker
docker run --rm -i --pull always surrealdb/surrealmcp:latest start \
--endpoint ws://localhost:8000/rpc --ns test --db test
The start subcommand is mandatory. Full tool catalog and host wiring:
rules/surrealmcp.md.
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/surrealmcp · pinned to the source commit
git clone https://github.com/24601/surreal-skills.git
cd surreal-skills
git checkout 4e66534bc9e56699c471cd7739297c7e184656b0
mkdir -p ".claude/skills/surrealmcp"
cp -r "skills/surrealmcp" ".claude/skills/surrealmcp"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 4e66534bc9e5. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References parent-directory traversal, which can escape a target directory.
Evidence: ../· fingerprint fa08499e14d0113b