• Start

MCP

MCP in Cursor

Add the SurrealDB MCP Server to Cursor and sign in with your Surreal ID.

With the SurrealDB MCP Server connected, Cursor's agent can reach your SurrealDB Cloud account while you work: check what is deployed, query a database, and read logs without leaving the editor.

Cursor reads ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one project. Add a surrealdb entry:

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

If the file already lists other servers, add this entry alongside them.

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.

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.

In the chat panel, ask:

Which SurrealDB Cloud organisations can you see?

Cursor should answer with your organisations. To see the whole tool surface, ask which SurrealDB tools it has available.

For a machine that cannot open a browser, create a token in the account portal and add it as a header:

{
  "mcpServers": {
    "surrealdb": {
      "url": "https://mcp.surrealdb.com",
      "headers": {
        "Authorization": "Bearer <your-token>"
      }
    }
  }
}

Give the token only the permissions you want the agent to have. Signing in lists what each one allows.

Warning

A token in a project-level .cursor/mcp.json will be committed with the repository. Keep tokens in the global ~/.cursor/mcp.json instead.

Create a task table in my dev instance with a title and a done flag, insert two rows, then show me the ones that are not done.

Cursor picks the instance, sets the namespace and database, and runs the SurrealQL, showing you each call as it goes. Example usages has more, including deploying an instance and investigating a slow query.

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

What you seeWhat to do
The indicator stays redClick Connect in Settings → MCP and complete the sign-in. Check the URL has no trailing path
Tools do not appear in chatReload the window after editing mcp.json
The agent asks you to authenticate on every requestSign in through Settings → MCP rather than answering in chat, so Cursor stores the connection
A tool reports a missing permissionYou are using a personal access token created without it. Create a new token with that box ticked

Was this page helpful?