# GitHub Copilot

Set up GitHub Copilot agent mode for SurrealDB with the hosted MCP server and the official Agent Skills.

[GitHub Copilot](https://github.com/features/copilot) reaches MCP servers through agent mode in VS Code. Once connected, Copilot Chat can query your SurrealDB Cloud instances and manage them alongside the code it is writing.

## Prerequisites

- VS Code 1.99 or later
- The GitHub Copilot extension with agent mode enabled

To enable agent mode, open VS Code settings, search for `github.copilot.chat.agent.enabled`, and set it to `true`.

## Add the MCP server

Copilot reads the same file VS Code does: `.vscode/mcp.json` for the workspace, or the user-level `mcp.json` for every project.

```json
{
  "servers": {
    "surrealdb": {
      "type": "http",
      "url": "https://mcp.surrealdb.com"
    }
  }
}
```

A workspace file makes the server available to everyone who opens the project. It holds no credentials, so it is safe to commit.

## Sign in

Reload the window, start the server from the MCP view, and approve the connection in the browser.

## Install the Agent Skills

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

## Check it worked

Open Copilot Chat in agent mode and ask which SurrealDB tools it can use. The tools picker in the chat input lists them once the server is running.

## Try it

> List my SurrealDB Cloud instances and tell me which region each one is in.

## Next steps

- [Visual Studio Code](/docs/agents/vscode.md) — the same file, without Copilot
- [SurrealDB MCP Server](/docs/build/ai-agents/mcp.md) — every tool the server publishes
