Loomal

MCP Toolbox for Databases in VS Code (GitHub Copilot) Copilot agent mode meets your real schema.

Add Google's MCP Toolbox for Databases to VS Code so Copilot's agent mode can run the queries you've sanctioned — defined once in tools.yaml, registered once in .vscode/mcp.json, shared with the whole team.

Copilot's agent mode is at its best when it can check facts instead of inferring them — and for database work, the facts live in your schema and your data. MCP Toolbox for Databases (github.com/googleapis/genai-toolbox, 15.5k stars) is Google's open-source MCP server that exposes exactly the query tools you define in a tools.yaml, against engines including PostgreSQL, MySQL, SQL Server, BigQuery, and Spanner.

VS Code reads MCP servers from mcp.json — project-scoped at .vscode/mcp.json or user-scoped via the MCP: Add Server command. Because a database toolbox usually belongs to a specific repo, the project file is the better home: commit it, and every teammate's Copilot gets the same vetted tool set.

Create .vscode/mcp.json

VS Code's MCP schema nests servers under a servers key (not mcpServers, the convention most other clients use). The Toolbox is an OCI container image, so the launch command is docker run over stdio. Keep the host side of the volume mount absolute.

.vscode/mcp.json
{
  "servers": {
    "toolbox": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/Users/you/db/tools.yaml:/config/tools.yaml",
        "us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:latest",
        "--tools-file", "/config/tools.yaml",
        "--stdio"
      ]
    }
  }
}

Start the server, pick the tools

Save the file and VS Code overlays a Start action on the server entry; the server also shows up in the Extensions view's MCP section. Start it, open Copilot Chat in agent mode, and click the tools (wrench) icon — your tools.yaml tool names should be listed and individually toggleable.

Copilot prompts for confirmation before each MCP tool call by default. For database tools that's worth keeping on, at least until the tool set has proven itself read-only and boring.

One file to review, one file to share

The pairing of .vscode/mcp.json and tools.yaml gives a team two small, reviewable contracts: the first says which server runs, the second says precisely what the agent may execute. A new teammate clones the repo, starts the server from the MCP view, and has the same governed database access as everyone else — no credentials pasted into chat, no ad-hoc SQL tools.

Troubleshooting in VS Code

Server stuck or erroring? The Output panel has a dedicated channel per MCP server — select the toolbox channel and read the launch output. Docker failures are explicit there: image pull errors, a relative mount path, or docker missing from VS Code's PATH (use the absolute binary path in the command field if so).

If the server runs but tool calls fail, the issue is inside the container: a tools.yaml that didn't validate or a database the container can't reach — remember host databases are host.docker.internal from inside Docker, not localhost. Running the docker command in a terminal shows the Toolbox's own startup diagnostics. Config-shape errors are silent, so double-check the servers key and the "type": "stdio" field; entries under mcpServers are ignored. Use the MCP view's restart action after edits, or Developer: Reload Window if state seems stale.

The live listing

The Toolbox's live listing on the Loomal marketplace at https://loomal.ai/marketplace/mcp-toolbox-for-databases shows its probed tool surface. If you maintain an MCP server of your own, claiming its Loomal listing verifies ownership and lets you price calls for agent consumers.

FAQ

How do I install the Toolbox for Databases in VS Code with Copilot?

Add a stdio entry under the servers key in .vscode/mcp.json that runs the Toolbox container with your tools.yaml mounted, or use MCP: Add Server from the Command Palette. Click Start in the MCP view, and the tools appear in Copilot agent mode's tool picker.

Where does VS Code keep MCP configuration?

Project-scoped servers live in .vscode/mcp.json — the right choice for a repo-specific database toolbox — while user-scoped servers are managed through the MCP: Add Server command. Both use VS Code's servers-keyed schema.

Why are there no Toolbox tools in Copilot's picker?

Check, in order: the config uses servers (not mcpServers) with type stdio; the server was actually started from the MCP view; chat.mcp.enabled isn't turned off; and the Output panel's toolbox channel for a docker launch error. One of those four explains nearly every case.

Is it safe to let Copilot query production?

Safer than most alternatives, because the agent can only invoke the named, parameterized tools in your tools.yaml — it never composes SQL. Even so, point it at a replica where you can, keep the tool set read-only by default, and leave per-call confirmation on.

Browse more MCP servers for VS Code.

Compare live-probed tool lists across the index.

Browse the marketplace