# Connect your editor

DBGorilla speaks MCP, the Model Context Protocol, which is the standard way an AI tool talks to an
outside service.  That means any MCP client can connect to it.  All it needs is a URL and a key.

The CLI configures several clients for you natively: Claude Code, Cursor, VS Code, opencode and
Gemini CLI.  You need the CLI installed and signed in.  If it is not, start at
[CLI Install and Setup](/docs/getting-started/cli-install-and-setup/).

To wire up a client yourself, go straight to
[Connect any MCP client by hand](/docs/integrations/mcp-client/#connect-any-mcp-client-by-hand).

## Wire up your editor

```sh
dbgorilla setup-ide
```

With no arguments this finds every supported tool on your machine and configures all of them.
Restart your editor and you are connected.  Some clients detect the new server automatically, but
restarting is the reliable way to be sure.

| Tool | Slug | Where the config goes |
|---|---|---|
| Claude Code | `claude-code` | Via `claude mcp add`; falls back to writing the file |
| Cursor | `cursor` | `~/.cursor/mcp.json` |
| VS Code | `vscode` | `.vscode/mcp.json`, in the current project, not your home directory |
| opencode | `opencode` | `~/.config/opencode/opencode.json` |
| Gemini CLI | `gemini` | `~/.gemini/settings.json` |
| Claude Desktop | `claude-desktop` | Not written; prints manual steps |

Claude Desktop is detect-only: remote MCP servers have to be added through **Settings →
Connectors** in the app, so the CLI prints instructions instead of editing anything.

```sh
dbgorilla setup-ide --list-clients        # what is supported, and what is on this machine
dbgorilla setup-ide --client cursor       # target one tool
dbgorilla setup-ide --client cursor,vscode
```

:::danger[Run `setup-ide` with no flags]

Every run of `setup-ide` issues a new MCP key and revokes the old one.  You have exactly one key,
and only the newest works.

For the effect of a narrowed run on your other editors, and how to recover, see [An editor stopped connecting after `setup-ide`](/docs/troubleshooting/editor-and-mcp/#an-editor-stopped-connecting-after-setup-ide).

`--dry-run` and `--print-config` also mint a key.  Both request one from the server before deciding
not to write anything.  They revoke the key your configured editors hold and write the new one
nowhere.  `--dry-run` is not a preview of `setup-ide`.

Two invocations leave your key alone:

```sh
dbgorilla setup-ide --list-clients
dbgorilla setup-ide --print-admin-allowlist
```

Everything else mints a new one.  Run `dbgorilla setup-ide` plain so every editor gets the same
current key in a single pass.  If you have only one editor, `--client` is fine.
:::

VS Code is different from the other tools.  They write a config in your home directory that applies
everywhere, while VS Code writes into the project you are currently in. `--scope user` or
`--scope project` overrides the default for the tools you selected.

The writes are conservative.  MCP servers you already had are kept, and a config containing `//`
comments is refused rather than rewritten.  Before modifying a config that already exists, the CLI
copies it to `<path>.backup.<timestamp>`; a file it creates from scratch has nothing to back up.

See [Connect any MCP client by hand](/docs/integrations/mcp-client/#connect-any-mcp-client-by-hand) and [Getting your MCP key](/docs/integrations/mcp-client/#getting-your-mcp-key) in Connect an MCP client by hand.

### If your organization gates MCP servers

On Claude Team and Enterprise, an admin must allowlist a server first.  This prints the details to
send them, and works before you have signed in:

```sh
dbgorilla setup-ide --print-admin-allowlist
```