Loomal

MCP Toolbox for Databases in Cursor real schema, real queries, while you code.

Stop pasting schemas into Cursor's chat. Google's MCP Toolbox for Databases gives the agent named, parameterized query tools over your actual database — configured in one mcp.json entry and a toggle.

MCP Toolbox for Databases (github.com/googleapis/genai-toolbox, 15.5k stars) is Google's open-source MCP server that mediates agent access to databases. You define sources and tools in a tools.yaml — each tool a named, parameterized query against engines including PostgreSQL, MySQL, SQL Server, BigQuery, and Spanner — and that's the entire surface the agent gets.

In Cursor, that means the agent can verify a column exists before writing the migration, or check production-shaped data before asserting what a function returns. Cursor reads MCP servers from ~/.cursor/mcp.json globally or .cursor/mcp.json per project; for a database tied to one codebase, the project file is the natural home.

Add the entry to mcp.json

Create .cursor/mcp.json in your project (or open Cursor Settings > MCP and add a server through the UI, which writes the same file). The Toolbox ships as an OCI image, so the command is docker with the image and flags in args. Host-side mount paths must be absolute.

.cursor/mcp.json
{
  "mcpServers": {
    "toolbox": {
      "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"
      ]
    }
  }
}

Enable the toggle

Open Cursor Settings > MCP. Each configured server has an enable toggle and a status dot — flip the Toolbox on and wait for the dot to go green, at which point Cursor lists the tools it discovered underneath the server name. Those names should match your tools.yaml exactly; if you see zero tools on a green dot, your tools.yaml parsed but defines nothing the agent can call.

In the chat, Cursor's agent will now reach for Toolbox tools when a question needs live data, asking your approval per call by default.

tools.yaml is the contract

Everything the Cursor agent can do against your database is written in tools.yaml, which makes review easy: read one file and you know the blast radius. Start with read-only lookups — schema inspection, row counts, scoped selects. Write tools are a deliberate later addition, not a default.

Troubleshooting in Cursor

Red or yellow status dot: the launch failed. Cursor is a GUI app and may not share your terminal's PATH, so docker can be unfindable even when the same command works in your shell — use the absolute path to the docker binary in the command field. Then check the usual Docker-over-stdio traps: the -i flag must be present, and a host database is host.docker.internal from inside the container, never localhost.

If the entry doesn't appear in settings at all, the JSON didn't parse — look for a trailing comma — or you edited the global ~/.cursor/mcp.json while expecting project scope (the project's .cursor/mcp.json file sits next to your code, and both are merged into the settings view). Cursor picks up file edits on save, but toggling the server off and on forces a clean relaunch; failing that, restart Cursor. For the server's own errors, run the docker command in a terminal and read the Toolbox's stderr.

The live listing

MCP Toolbox for Databases has a live listing with a probed tool list on the Loomal marketplace at https://loomal.ai/marketplace/mcp-toolbox-for-databases. Builders who maintain their own MCP server can claim a listing like this to verify ownership and attach per-call pricing for agent traffic.

FAQ

How do I install the Toolbox for Databases in Cursor?

Add a docker run entry under mcpServers in .cursor/mcp.json (project) or ~/.cursor/mcp.json (global), mounting your tools.yaml and passing --tools-file and --stdio. Then enable the server's toggle in Cursor Settings > MCP and wait for the green status dot.

Project or global config — which should I use?

Project (.cursor/mcp.json) when the database belongs to that codebase, since teammates get the definition with the repo. Global (~/.cursor/mcp.json) for a personal setup you want in every project. Cursor merges both into the same settings panel.

Why is the status dot red when docker works in my terminal?

Cursor doesn't inherit your shell's PATH, so it may not resolve the docker binary. Put the absolute path (for example /usr/local/bin/docker) in the command field. If the dot stays red, run the full command manually — the Toolbox's startup stderr names the real problem.

The server is green but shows no tools — what now?

The container started but your tools.yaml defines no valid tools, or validation stripped them. Run the docker command in a terminal and read the startup output; the Toolbox reports exactly which tool definitions it loaded and which it rejected.

Browse more MCP servers for Cursor.

Live-probed tool lists on every listing.

Browse the marketplace