---
title: "SurrealDB MCP Server | SurrealDB"
description: "Connect Claude, Cursor, and other AI tools to your SurrealDB Cloud with one URL. Deploy instances, query data, manage teams, and give agents long-term memory."
url: https://surrealdb.com/mcp
---

# SurrealDB MCP Server

Connect Claude, Cursor, and other AI tools to your SurrealDB Cloud account with a single URL. Deploy instances, query data, investigate problems, and manage costs - all from your assistant.

[Read the docs](https://surrealdb.com/docs/build/ai-agents/mcp) [Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy)

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

WHAT IS MCP?

## Connect AI assistants to your data

Model Context Protocol is an open standard for connecting AI assistants to outside tools and data. Instead of copying a connection string into a chat window and pasting query results back out, your assistant works with SurrealDB directly.

[https://mcp.surrealdb.com](https://mcp.surrealdb.com/)

The server is hosted for you - nothing to install and nothing to keep running. It acts as you: it sees only the organisations you belong to, respects the role you hold in each one, and asks you to confirm anything that cannot be undone.

CAPABILITIES

## What you can do

One connection gives your assistant access to SurrealDB Cloud, your instance data, and Agent Memory (early access).

### Deploy and manage instances

Create an instance, pause one you are not using, resize it as traffic grows, or upgrade it to a newer version of SurrealDB.

### Work with your data

Ask a question in plain language and let the assistant write and run the SurrealQL, or have it create tables and seed records while you build.

### Look into problems

Pull up instance status, metrics, and logs next to the query you were just writing.

### Manage your team

Invite people to an organisation, change what they can do, and withdraw invitations.

### Keep an eye on cost

Check usage and invoices, and estimate what an instance will cost before you create it.

### Give agents long-term memory

Create and manage Agent Memory contexts, then store and recall memories from them.

CONNECT

## Connect your AI tool

Most clients need nothing but the URL. Add the server to your MCP client, sign in with your Surreal ID, and ask your assistant to list your organisations to confirm the connection.

[Add to VS Code](vscode:mcp/install?%7B%22name%22%3A%22SurrealDB%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.surrealdb.com%22%7D) [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=SurrealDB&config=eyJ1cmwiOiJodHRwczovL21jcC5zdXJyZWFsZGIuY29tIn0=)

Default configuration

Add [https://mcp.surrealdb.com](https://mcp.surrealdb.com/) as a remote MCP server. Sign in with your Surreal ID when prompted.

```
1{2  "mcpServers": {3    "surrealdb": {4      "url": "https://mcp.surrealdb.com"5    }6  }7}
```

Personal access token

Use a token when your client cannot open a browser, or when something runs unattended. Create one in the [account portal](https://account.surrealdb.com/tokens).

```
1{2  "mcpServers": {3    "surrealdb": {4      "url": "https://mcp.surrealdb.com",5      "headers": {6        "Authorization": "Bearer <your-token>"7      }8    }9  }10}
```

WORKING WITH DATA

## Query from the same connection

The same connection that manages an instance can also query it. Your assistant chooses the namespace and database, writes the SurrealQL, and shows you what came back. Instances must be running and on SurrealDB 3.1 or later.

```
1-- Ask your assistant to run queries like this2USE NS demo DB app;34SELECT5    ->purchased->product AS purchase_history,6    ->reviewed->product AS reviewed_products7FROM ONLY user:jaime;
```

SELF-HOSTED

## Embedded MCP for databases you run yourself

The hosted server covers SurrealDB Cloud. To give an assistant tools against a database you run yourself, see [Embedded MCP](https://surrealdb.com/docs/build/ai-agents/mcp/embedded) in the docs. The same tool surface - query, select, create, list, info, and more - is built into SurrealDB 3.1 and later.

### [SurrealDB Cloud](https://surrealdb.com/cloud)

Deploy, manage, and query cloud instances through the hosted MCP server at mcp.surrealdb.com.

Learn more

### [Agent Memory](https://surrealdb.com/agent-memory)

Store, search, recall, and reflect on what an agent has learned through Agent Memory contexts.

Learn more

### [Embedded MCP](https://surrealdb.com/docs/build/ai-agents/mcp/embedded)

Run the MCP server inside SurrealDB itself for self-hosted and local databases.

Learn more

FREQUENTLY ASKED QUESTIONS

## SurrealDB MCP Server

What is the Model Context Protocol?

Which AI tools support MCP?

How do I sign in?

Can I use MCP with a self-hosted database?

Why can't my assistant query my instance?

GET STARTED

## Connect your AI tools to SurrealDB Cloud

Add one URL to your MCP client, sign in with your Surreal ID, and start working with your databases alongside your assistant.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)![NVIDIA](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)![Apple](https://surrealdb.com/assets/static/f7dc2519e0d212bc.Cn8MYAK7.svg)![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

[Read the docs](https://surrealdb.com/docs/build/ai-agents/mcp) [Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy)

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"MCP","item":"https://surrealdb.com/mcp"}]}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the Model Context Protocol?","acceptedAnswer":{"@type":"Answer","text":"MCP is an open standard for connecting AI assistants to outside tools and data. The SurrealDB MCP Server connects your assistant to SurrealDB Cloud so it can deploy instances, query data, manage teams, and work with Agent Memory."}},{"@type":"Question","name":"Which AI tools support MCP?","acceptedAnswer":{"@type":"Answer","text":"Any MCP-compatible client can connect, including Cursor, VS Code, Claude Desktop, Claude Code, and Windsurf. Most clients need only the URL https://mcp.surrealdb.com."}},{"@type":"Question","name":"How do I sign in?","acceptedAnswer":{"@type":"Answer","text":"If your client supports sign-in, it opens a browser window for you to sign in with your Surreal ID. For unattended or headless setups, create a personal access token in the account portal and pass it as an Authorization header."}},{"@type":"Question","name":"Can I use MCP with a self-hosted database?","acceptedAnswer":{"@type":"Answer","text":"Yes. SurrealDB 3.1 and later includes Embedded MCP for databases you run yourself. The hosted server at mcp.surrealdb.com is for SurrealDB Cloud management and querying cloud instances."}},{"@type":"Question","name":"Why can't my assistant query my instance?","acceptedAnswer":{"@type":"Answer","text":"The instance may be paused or still starting - wait until it reports as ready, or ask your assistant to resume it. Data tools also require SurrealDB 3.1 or later; ask your assistant to upgrade older instances."}}]}
```
