Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

MCP server · Databases

MCP Toolbox for Databases

One open-source MCP server with ready-made tools for PostgreSQL, MySQL, BigQuery, Spanner, AlloyDB and many other databases.

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

Overview

What it does

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

What the assistant can do

  • 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

Install MCP Toolbox for Databases in your app

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.

Want it alongside other servers? Open MCP Toolbox for Databases in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

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.

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?