Skip to content

CLI

MCP without the editor

dbcode mcp gives an agent DBCode’s MCP tools from your saved connections. It does not need the editor to be open.

{
"mcpServers": {
"dbcode": { "command": "dbcode", "args": ["mcp"] }
}
}

On start, the CLI looks for about two seconds for an editor window that runs DBCode’s stdio bridge. Windsurf, Kiro and Antigravity run it once you accept DBCode’s offer to set up their agent. If it finds one, the session goes through that editor, with its approval prompts and activity view. If not, the CLI serves the tools itself until the client closes it.

VS Code and Cursor register the tools with their own agents and do not run the bridge. From those editors an external agent reaches DBCode over the HTTP server, and dbcode mcp always runs standalone.

If a bridged editor closes mid-session, the CLI takes the session over. Requests the editor never answered get an error reply, so the agent can decide whether to retry.

Standalone, the CLI reads connections the way dbcode query does: the editor’s user settings plus the workspace settings of the directory the client started it in. --workspace points at a different directory. If more than one editor has DBCode connections, pick one:

{
"mcpServers": {
"dbcode": { "command": "dbcode", "args": ["mcp", "--app", "Cursor", "--profile", "Work"] }
}
}

Every saved connection is listed. Ones the CLI cannot open, such as SSH tunnels, cloud providers, auth profiles, and passwords that come from a command or a prompt, say so when used. The connections page lists the supported drivers.

  • Approvals. Where the editor would ask you first, the CLI asks through the agent’s client if it supports MCP elicitation. Otherwise the statement is refused and the message says why. Allow the statement in the connection’s role, or use the editor.
  • Copy data and inferred relationships need the editor. The tools are listed and refuse with a reason.
  • Nothing is written to the editor’s history.
  • Pro features use the licence the editor stored on this machine. Sign in from the editor, not the CLI.
  • A masking rule scoped to a table or schema applies to every result, because the CLI does not resolve which table a column came from. That masks more, never less.
  • Team members whose permissions the editor has not synced yet are refused until it runs once.

Roles, statement policy, masking and the row limit otherwise apply exactly as in the editor.