Skip to content
MCP Shelf

MCP Toolbox for Databases

View on GitHub

Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases.

  • Started in our test
  • ★ 16.7K GitHub stars
  • 31.2K downloads a week
  • Last commit 25 Oct 2026

At a glance

Toolbox is a server from Google that ships ready-made tool sets for a long list of databases. Pick one with --prebuilt and pass connection details as environment variables, or write your own tools file to expose only the queries you approve.

That second option is the reason to choose it: you can give an assistant five named queries instead of raw SQL.

Made by
Google (googleapis)
Licence
Apache-2.0
Latest version
1.15.0 (23 Oct 2026)
GitHub stars
16.7K
Downloads
31.2K a week
Last commit
25 Oct 2026
Tools
29
Runs on
Your computer

Our check: We ran this exact config on 26 Oct 2026: it started and answered with 29 tools. @toolbox-sdk/server on npm is published from googleapis/mcp-toolbox.

What's in the pod: its tools

We found 29 tools when we started it on 26 Oct 2026. 22 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

How we tested it: Started with the published config against a local Postgres 16 database.

Runs commands1 tool · Can start programs or run code.

ToolWhat it is for
execute_sqlRuns a SQL statement the agent writes against the connected database.

Changes things6 tools · Can create, edit, send or delete.

ToolWhat it is for
get_query_planShows how Postgres would run a query, as JSON, without running it.
list_autovacuum_configurationsShows the server's autovacuum settings.
list_invalid_indexesFinds broken indexes that take space but the planner cannot use.
list_memory_configurationsShows the server's memory settings.
list_replication_slotsLists replication slots and how far behind each one is.
list_top_bloated_tablesFinds the tables with the most dead rows waiting to be cleaned up.

Only reads22 tools · Looks things up and changes nothing.

ToolWhat it is for
database_overviewGives a quick snapshot of the server: version, uptime, whether it is a replica and connection counts.
get_column_cardinalityEstimates how many distinct values each column of a table holds.
list_active_queriesShows the queries running right now, longest first.
list_available_extensionsLists extensions that could be installed on this server.
list_database_statsShows activity and size figures for each database on the server.
list_indexesLists your indexes with their size and how often they are used.
list_installed_extensionsLists the extensions already installed.
list_locksShows which sessions hold locks and on what.
list_pg_settingsLists server configuration values.
list_publication_tablesLists tables included in logical replication publications.
list_query_statsRanks past queries by total time, from pg_stat_statements.
list_rolesLists the user roles and their rights.
list_schemasLists the schemas in the database.
list_sequencesLists sequences and their current values.
list_stored_procedureLists stored procedures with their language and definition.
list_table_statsShows table activity, such as sequential scans and row counts.
list_tablesLists the tables in the database with their columns, so the agent learns the schema.
list_tablespacesLists tablespaces and their size.
list_triggersLists triggers and which tables they fire on.
list_viewsLists views and their definitions.
long_running_transactionsFinds transactions that have been open longer than a limit you set.
replication_statsShows each replica's lag and connection details.

Tool groups

--prebuilt=postgres
Ready-made tools for PostgreSQL. Swap the name for mysql, sqlserver, oracle, mongodb, redis, snowflake, clickhouse, neo4j and more.
--prebuilt=bigquery
Google Cloud data: also alloydb-postgres, cloud-sql-postgres, cloud-sql-mysql, spanner and firestore.
--prebuilt=<database>/<toolset>
Load only part of a prebuilt set, such as the data tools without the admin ones.
tools.yaml
Your own tools: fixed, parameterised queries you write once, so the agent can only run what you allowed.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

Set it up

Pick your app for the exact snippet and where it goes.

Where it goes: claude_desktop_config.json (Settings → Developer → Edit Config)

Claude Desktop
{
  "mcpServers": {
    "mcp-toolbox-for-databases": {
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ],
      "env": {
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432",
        "POSTGRES_DATABASE": "dbname",
        "POSTGRES_USER": "user",
        "POSTGRES_PASSWORD": "password"
      }
    }
  }
}

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop and ChatGPT.

Settings

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
--prebuiltCommand line flagStarts with a ready-made tool set for one database type, with no config file.--prebuilt=postgres
--stdioCommand line flagTalks to a client over standard input and output, which most desktop clients need.
--configCommand line flagPath to a tools.yaml that defines your sources, tools and toolsets.--config tools.yaml
POSTGRES_HOSTEnvironment variableConnection details for the prebuilt Postgres tools, alongside POSTGRES_PORT, POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD. Other databases use their own names.
--uiCommand line flagOpens a local web page to try out your tools before an agent uses them.
--telemetry-otlpCommand line flagSends traces and metrics to any OpenTelemetry collector.

What it can touch

It can read

  • Whichever databases you configure as sources, from Postgres and MySQL to BigQuery and MongoDB

It can change

  • Data, if you load a prebuilt set with execute_sql or write tools that update rows
  • Nothing else when you only define read queries in tools.yaml

Safer setup: Skip the prebuilt execute_sql and write your own tools.yaml with fixed queries, and give the database user read-only rights.

Before you start

  • Node.js 18 or newer
  • Connection details for your database

If it does not work

Prebuilt tools cannot connect
Each database expects its own environment variables. Check the prebuilt tools reference for the exact names and set them in the client config.
The client only shows some tools
You may be connected to a toolset URL. Use /mcp for everything or /mcp/<toolset> for one group.
Unsure whether a custom tool works
Run toolbox --ui and try it by hand first.

Peas in a pod: similar servers

How MCP Toolbox for Databases lines up against other databases and data servers on the shelf.

ServerToolsRuns onLicenceStars
MCP Toolbox for Databases29Your computerApache-2.016.7K
Qdrant2Your computerApache-2.01.6K
Excel MCP Server46Your computerMIT4.3K
Postgres MCP Pro9Your computerMIT3.4K
Supabase29Hosted–3K

Questions

Is it only for Google Cloud?

No. It covers Google databases such as BigQuery, AlloyDB and Spanner, and also Postgres, MySQL, SQL Server, Oracle, MongoDB, Redis, Snowflake and many more.

Why write tools.yaml instead of letting the AI write SQL?

Predefined queries limit the agent to safe, tested actions, which suits production data.

Can I use it from my own app?

Yes. SDKs for Python, JavaScript, Go and Java load the same tools into LangChain, LlamaIndex, Google ADK and other frameworks.

Is it free?

Yes, Apache 2.0 licensed. Google also sells managed MCP servers for its databases if you would rather not host it.

Full docs on GitHubgoogleapis/genai-toolbox

Something wrong on this page? Tell us.

More in Databases and data