Skip to content
AI Dev Toolkit.
Esc
  • Loading…

MCP server · Databases

MCP Toolbox for Databases

MCP Toolbox for Databases is Google’s open-source MCP server for databases. It offers ready-made tools for PostgreSQL, MySQL, BigQuery, Spanner, AlloyDB and many others. It runs locally with npx @toolbox-sdk/server and the prebuilt config for your database, and needs that database’s connection details. Its execute_sql tool runs any SQL the user may run.

Maintainer
Google (official)
Licence
Apache-2.0
Runs
Locally (npx)
Sign-in
A token or API key
Registry version
1.18.0 (updated 2026-11-20)
Last activity
2026-10-13

Overview

What can the MCP Toolbox for Databases do?

MCP Toolbox for Databases is an open-source server from Google, formerly named Gen AI Toolbox. Run it with a --prebuilt flag such as postgres, mysql or bigquery and it loads a ready set of tools for that database. You set the connection details as environment variables. Supported sources include Google Cloud databases such as AlloyDB, BigQuery, Cloud SQL, Spanner and Firestore, plus PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Redis, ClickHouse, Neo4j, Snowflake and more.

For PostgreSQL the prebuilt set covers SQL execution, table and schema listings, query plans, and health checks such as locks, bloat, replication and index statistics. A toolset suffix like postgres/data loads only the SQL tools. Beyond prebuilt tools, a tools.yaml file lets you define your own fixed queries and toolsets for production agents. The server also ships as a single binary and a container image.

Tools

Tools it gives the assistant

  • Prebuilt tool sets for more than 20 databases
  • SQL execution, table listing and query plans
  • Database health tools (locks, bloat, replication, index stats)
  • Custom tools and toolsets defined in tools.yaml
  • Read-only enforcement for Cloud SQL, AlloyDB and BigQuery
  • Client SDKs for Python, JavaScript, Go and Java

Install

How do I install MCP Toolbox for Databases in Claude Code, Cursor or VS Code?

You need:

  • Node.js with npx (or the standalone toolbox binary)
  • Connection details for the database you choose

Run in your project. --scope local keeps the servers private to you in this project; use user for every project.

Terminal
claude mcp add --env POSTGRES_HOST="${POSTGRES_HOST}" --env POSTGRES_PORT=5432 --env POSTGRES_DATABASE="${POSTGRES_DATABASE}" --env POSTGRES_USER="${POSTGRES_USER}" --env POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" --scope local mcp-toolbox -- npx -y @toolbox-sdk/server --prebuilt=postgres --stdio
Native Windows (PowerShell)
claude mcp add --env POSTGRES_HOST="$env:POSTGRES_HOST" --env POSTGRES_PORT=5432 --env POSTGRES_DATABASE="$env:POSTGRES_DATABASE" --env POSTGRES_USER="$env:POSTGRES_USER" --env POSTGRES_PASSWORD="$env:POSTGRES_PASSWORD" --scope local mcp-toolbox -- cmd /c npx -y '@toolbox-sdk/server' --prebuilt=postgres --stdio
  • Set POSTGRES_HOST, POSTGRES_DATABASE, POSTGRES_USER, POSTGRES_PASSWORD first, e.g. export POSTGRES_HOST=… in your shell. The command saves the value, not the variable.

Need another app? Open MCP Toolbox for Databases in the MCP config generator for a shared project .mcp.json, Devin, or several servers at once; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

Is the MCP Toolbox for Databases safe? Check before you install

  • The prebuilt execute_sql tool runs any SQL the database user is allowed to run; connect with a user that has only the grants you want.
  • Engine-enforced read-only mode is documented for Cloud SQL, AlloyDB and BigQuery (for example BIGQUERY_READONLY=true), not for plain PostgreSQL.
  • The example targets PostgreSQL; change --prebuilt and the environment variables for other databases.
  • A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.

FAQ

MCP Toolbox for Databases questions

Is the MCP Toolbox for Databases official?

Yes. Google publishes and maintains it, under the Apache-2.0 licence. Install it only from the source linked on this page, not from a copy in another directory.

Is MCP Toolbox for Databases remote or local?

Local. Your MCP app starts it on your machine with npx, and it runs with your user account’s permissions.

Does MCP Toolbox for Databases need an API key or account?

Yes. It needs an API key or token from the service, which you pass as an environment variable or header rather than writing it into the config file. You also need: Node.js with npx (or the standalone toolbox binary); Connection details for the database you choose.

Why it’s listed

Why we list it

Covers many databases from one well-maintained Google project, with frequent releases.

Related

All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?

Keep exploring