PlugWiki
MCP Toolbox for Databases logo

MCP Toolbox for Databases: Setup for Claude, Cursor and Other Apps

OfficialLocal
Getnpm@toolbox-sdk/servergoogleapis/mcp-toolbox

Lets Claude, Cursor and other assistants explore and query your database, from PostgreSQL and MySQL to BigQuery, Spanner and more.

MCP Toolbox for Databases is a Google open source server. You pick a database with the prebuilt flag and the server offers tools for that database. Run it on your computer with your own database login.

Tool names and counts depend on the database you choose. This page lists the PostgreSQL set as a guide, and the README sends you to the vendor's reference for the others. The execute SQL tool can change data, so use a limited database user or a monitoring toolset.

Good for

  • Developers who want an assistant to explore schemas and write queries against a real database
  • Database admins checking slow queries, locks and replication
  • Teams building their own database tools from a config file

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install MCP Toolbox for Databases

Claude Code

  1. 1

    Copy this prompt.

    Add the MCP Toolbox for Databases server to Claude Code. Run this command:
    
    claude mcp add toolbox-for-databases -- npx -y @toolbox-sdk/server --prebuilt=postgres --stdio
    
    Ask me for POSTGRES_DATABASE, POSTGRES_USER, POSTGRES_PASSWORD and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js, A database and its login.

Read-only mode: Change the prebuilt value to postgres/health (or postgres/monitor) to load a toolset without the SQL tool, and use a database user with only SELECT.

This is the PostgreSQL example from the README. For another database, change --prebuilt=postgres and set that database's variables, listed in the vendor's Prebuilt Tools Reference.

Built from the package data we hold. Not yet tested by us.

Tools

  • Runs any SQL statement

    Executes a single SQL statement against the database. It can read, change or delete data, whatever the database user is allowed to do.

    Try: “Run SELECT count(*) FROM orders.”

    Delete · execute_sql

  • Lists tables and their columns

    Lists your tables with columns, constraints, indexes, triggers, owner and comment, optionally filtered by name.

    Try: “What tables do I have and what columns are in users?”

    Read · list_tables

  • Lists views

    Lists views from the database, 50 rows by default.

    Try: “Which views exist in this database?”

    Read · list_views

  • Lists schemas

    Lists the schemas in the database.

    Try: “What schemas are in this database?”

    Read · list_schemas

  • Lists indexes

    Lists the user indexes in the database.

    Try: “Which indexes exist on the orders table?”

    Read · list_indexes

  • Lists triggers

    Lists the triggers in the database.

    Try: “What triggers are defined here?”

    Read · list_triggers

  • Lists sequences

    Lists the sequences in the database.

    Try: “Show me all sequences.”

    Read · list_sequences

  • Lists stored procedures

    Lists the stored procedures in the database.

    Try: “What stored procedures exist?”

    Read · list_stored_procedure

  • Shows query statistics

    Lists statistics about the queries the server has run.

    Try: “Which queries use the most time?”

    Read · list_query_stats

  • Shows how a query would run

    Generates the estimated EXPLAIN plan for one SQL statement without running it.

    Try: “Show the plan for this slow join.”

    Read · get_query_plan

  • Shows database activity statistics

    Lists key performance and activity statistics for each database on the server.

    Try: “How busy is each database?”

    Read · list_database_stats

  • Lists queries running now

    Lists the top 50 currently running queries, longest first, from pg_stat_activity.

    Try: “What is running on the database right now?”

    Read · list_active_queries

From the official docs

Permissions

high risk · 3 things to watch

High risk

With the default PostgreSQL set the assistant can run any SQL statement your database user is allowed to run. Use a read-only database user, or load a toolset without the SQL tool.

What it can do

Watch out for

  • The SQL tool can change or delete data

    The execute SQL tool runs any single statement the database user may run. Give it a user with only the access you want the assistant to have. github.com

  • Your database password sits in a client config

    Connection details are set as environment variables, often in an MCP config file. Keep that file private. github.com

  • Tools differ per database

    Other databases expose different tools, some of them for administering cloud services. Check the vendor's reference before connecting a production system. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyNo single read-only flag is documented. Choose a toolset that has no SQL tool, such as --prebuilt=postgres/health, and use a database user with only SELECT.
Talks toYour database server
Sign-in and keysDatabase host, name, user and password go in environment variables on your computer, for example POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD for PostgreSQL.
Scopes
  • Database user's own permissions

Questions

Is this a Google product?

Yes. It lives in Google's googleapis organization on GitHub and the README points to Google Cloud docs.

Which databases does it support?

The README lists AlloyDB, BigQuery, Cloud SQL, Spanner, Firestore, PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, Trino and more.

Do I need an API key?

No key. You give it the database login through environment variables. Google Cloud databases use the variables listed in the vendor's prebuilt reference.

Can I stop it from changing data?

Partly. Use a database user with only read permission, or pick a toolset such as health or monitor that has no SQL tool. There is no single read-only flag in the README.

Is this list of tools complete?

No. It shows the PostgreSQL tools. Other databases have their own tool sets, and you can also define custom tools in a tools.yaml file.

How is it different from Google's managed MCP servers?

Toolbox runs on your own machine or server. The README points to Google Cloud's managed MCP servers for a hosted option with prebuilt tools.

How do I choose the database?

Change the prebuilt value in the config, for example postgres or mysql. The install box shows PostgreSQL as the example.

Information

updated Nov 2, 2026

Publisher
Official
Package
@toolbox-sdk/server
Registry
npm
Transport
stdio, Streamable HTTP
Auth
token in env
Version
1.15.0
License
Apache-2.0
Last commit
Oct 31, 2026
Open issues
178
Listed in
Official MCP registry

WebsiteGitHubOfficial MCP RegistryChangelogIssues

Other PostgreSQL MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 3
  1. github.com · github.com
  2. github.com · github.com
  3. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.