# Surrealmcp

> Connects AI agents to SurrealDB via built-in MCP (SurrealDB 3.1+) or standalone surrealmcp for database operations.

- Skill: `24601/surrealmcp` (Agent Skill)
- Install (CLI): `npx skillmds@latest add 24601/surrealmcp`
- Raw SKILL.md: https://api.skillmd.com/api/skills/24601/surrealmcp/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics, AI & ML, Agent Building, SQL & Databases
- Tags: Agent Connectivity, Database, Docker, Mcp, Surrealdb
- License: MIT
- Author: 24601 (https://skillmd.com/u/24601)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/24601/surrealmcp

---


# SurrealDB MCP for AI Agents

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 |

## Built-in MCP (SurrealDB 3.1+)

```bash
# 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](../../rules/surrealmcp.md) for env vars and tool hints.

## Standalone surrealmcp (v0.4.0)

Not published to crates.io or npm. Install from source or Docker:

```bash
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](../../rules/surrealmcp.md).

