Skip to content

Connect an MCP client by hand

Last updated

View as Markdown

You do not have to let the CLI edit your files, and you are not limited to the tools it knows about. DBGorilla is an ordinary remote MCP server, so any client that speaks the protocol can connect to it, including newer clients and ones you build yourself.

For OAuth sign-in, the full tool list and what to allow, see MCP server.

Any client needs only these four details:

Value
Server namedbgorilla
Server URLyour deployment with /mcp/ on the end. On SaaS: https://app.dbgorilla.com/mcp/
TransportStreamable HTTP (choose it over SSE or stdio; there is no local process to run)
Authenticationthe HTTP header Authorization: Bearer <your MCP API key>

For a read-only set of tools, use https://app.dbgorilla.com/mcp/readonly as the server URL. The key and the entries below stay the same. The read-only set of tools lists what it includes.

To call DBGorilla from a terminal or a script, without an AI tool, use DBGorilla from the command line.

If your client asks for a command to run, a stdio binary, or a package to install, that option does not apply: DBGorilla is a hosted endpoint with no local server. Look for whatever the client calls a remote, HTTP, or custom MCP server.

Get the key first, then use the entry for your client below, or write the equivalent for a client that is not listed.

You have one MCP key at a time. dbgorilla setup-ide --print-key prints it, and --print-config prints it inside each client’s entry. Neither replaces it. Only --rotate-key issues a new key, and that revokes the old one in every editor already using it.

The app shows it too. Open your profile in DBGorilla, select MCP Access, and find the MCP Server card: your current key is there, with a copy button. Reading it there changes nothing. You can also regenerate or delete the key from that card.

If you would rather stay in the terminal, copy it from a config the CLI has already written:

Terminal window
# whichever of these exists on your machine
grep -o 'Bearer [^"]*' ~/.cursor/mcp.json
grep -o 'Bearer [^"]*' ~/.gemini/settings.json
grep -o 'Bearer [^"]*' ~/.config/opencode/opencode.json
grep -o 'Bearer [^"]*' .vscode/mcp.json

Or ask the API. This endpoint returns the existing key and does not rotate it. GET reads, only POST regenerates:

Terminal window
# macOS
TOKEN=$(security find-generic-password -s dbgorilla -a tokens -w | jq -r .access_token)
curl -sH "Authorization: Bearer $TOKEN" \
https://app.dbgorilla.com/api/v0_1/client_api_keys/mcp-api-access

On Linux the CLI stores the same value in the Secret Service keyring. Use secret-tool lookup service dbgorilla username tokens in place of the security call. Where no keyring is running, the CLI warns you and stores it in plain text in credentials.json, in the same directory as cli.toml, readable only by you.

Both routes put a live credential on your screen. The API route also puts your sign-in token into your process list for the duration of the request, where other users on a shared machine can read it. On a machine you do not control, prefer copying the key from the app.

Lost or leaked key: see When a new key is the right answer.

Most clients keep MCP servers in a JSON file under an mcpServers object, so the entries below differ only in details. If yours is not here, copy the closest one and check its documentation for what it calls the URL field.

In ~/.claude.json or via claude mcp add:

{
"mcpServers": {
"dbgorilla": {
"type": "http",
"url": "https://app.dbgorilla.com/mcp/",
"headers": { "Authorization": "Bearer <your MCP API key>" }
}
}
}

In ~/.cursor/mcp.json (or .cursor/mcp.json for one project). Same shape, without the type field:

{
"mcpServers": {
"dbgorilla": {
"url": "https://app.dbgorilla.com/mcp/",
"headers": { "Authorization": "Bearer <your MCP API key>" }
}
}
}

In .vscode/mcp.json for the project, or your user mcp.json. The top-level key is servers. Using mcpServers here silently loads nothing:

{
"servers": {
"dbgorilla": {
"type": "http",
"url": "https://app.dbgorilla.com/mcp/",
"headers": { "Authorization": "Bearer <your MCP API key>" }
}
}
}

In ~/.gemini/settings.json. Use httpUrl, which selects Streamable HTTP. The url key selects SSE instead, which is not what the DBGorilla endpoint serves:

{
"mcpServers": {
"dbgorilla": {
"httpUrl": "https://app.dbgorilla.com/mcp/",
"headers": { "Authorization": "Bearer <your MCP API key>" }
}
}
}

In ~/.config/opencode/opencode.json. The servers live under mcp, not mcpServers, and the entry needs enabled:

{
"mcp": {
"dbgorilla": {
"type": "remote",
"url": "https://app.dbgorilla.com/mcp/",
"enabled": true,
"headers": { "Authorization": "Bearer <your MCP API key>" }
}
}
}

Claude Desktop cannot be configured by file at all. Remote MCP servers go through Customize → Connectors → Add custom connector, where you paste https://app.dbgorilla.com/mcp/ and complete the OAuth prompt. It authenticates with OAuth rather than a Bearer token, so the key above does not apply. Custom connectors are available on every Claude plan, and the Free plan allows one. On Team and Enterprise, an owner adds the connector under Organization settings → Connectors.

Restart the client afterward. Some reload MCP configuration on their own, some only on startup, so restarting is the one step that always works.

To check a hand-wired client, and what a 401 means, see The MCP server returns a 401.