# Cursor

Set up Cursor for SurrealDB with the hosted MCP server and the official Agent Skills.

[Cursor](https://cursor.com) is an AI-first editor built on VS Code. With the SurrealDB MCP server connected, its agent can check what is deployed, query a database, and read logs without leaving the editor.

## Add the MCP server

Cursor reads `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` for one. Add a `surrealdb` entry alongside any servers already listed:

```json
{
  "mcpServers": {
    "surrealdb": {
      "url": "https://mcp.surrealdb.com"
    }
  }
}
```

Nothing about your account is stored in `mcp.json`, so a project-level file is safe to commit. Everyone who opens the project signs in as themselves.

## Sign in

Open **Settings → MCP**, find **surrealdb**, and click **Connect**. Cursor opens a browser window where you sign in with your Surreal ID and approve the connection. The indicator beside the server turns green when it is ready.

> [!WARNING]
> If you use a [personal access token](/docs/build/ai-agents/mcp.md#signing-in) instead, keep it in the global `~/.cursor/mcp.json`. A token in a project-level file will be committed with the repository.

## Install the Agent Skills

```bash
npx skills add surrealdb/agent-skills
```

## Check it worked

Ask the chat panel:

> Which SurrealDB Cloud organisations can you see?

Cursor should answer with your organisations. Reload the window if the tools do not appear after editing `mcp.json`.

## Remove it

Delete the `surrealdb` entry from `mcp.json`. Cursor stops offering the tools in new sessions.

## Next steps

- [MCP in Cursor](/docs/build/ai-agents/mcp/cursor.md) — the full guide, including troubleshooting
- [Example usages](/docs/build/ai-agents/mcp/examples.md) — more prompts to try
