
MCP Toolbox for Databases: Setup for Claude, Cursor and Other Apps
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.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install MCP Toolbox for Databases
Claude Code
- 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
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_sqlLists 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_tablesLists views
Lists views from the database, 50 rows by default.
Try: “Which views exist in this database?”
Read ·
list_viewsLists schemas
Lists the schemas in the database.
Try: “What schemas are in this database?”
Read ·
list_schemasLists indexes
Lists the user indexes in the database.
Try: “Which indexes exist on the orders table?”
Read ·
list_indexesLists triggers
Lists the triggers in the database.
Try: “What triggers are defined here?”
Read ·
list_triggersLists sequences
Lists the sequences in the database.
Try: “Show me all sequences.”
Read ·
list_sequencesLists stored procedures
Lists the stored procedures in the database.
Try: “What stored procedures exist?”
Read ·
list_stored_procedureShows query statistics
Lists statistics about the queries the server has run.
Try: “Which queries use the most time?”
Read ·
list_query_statsShows 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_planShows database activity statistics
Lists key performance and activity statistics for each database on the server.
Try: “How busy is each database?”
Read ·
list_database_statsLists 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_queriesFinds long transactions
Lists transactions that run longer than a time limit you set.
Try: “Are any transactions stuck for over 5 minutes?”
Read ·
long_running_transactionsLists locks
Lists locks held by active processes with the query and lock mode for each.
Try: “Is anything blocking my migration?”
Read ·
list_locksFinds the most bloated tables
Lists the tables with the most wasted space.
Try: “Which tables need vacuuming?”
Read ·
list_top_bloated_tablesFinds unusable indexes
Lists indexes that take disk space but cannot be used, often left by a failed concurrent index build.
Try: “Do I have any broken indexes?”
Read ·
list_invalid_indexesShows table statistics
Lists statistics for tables.
Try: “Which tables are read the most?”
Read ·
list_table_statsCounts distinct values in a column
Gets the cardinality of columns.
Try: “How many distinct values does status have?”
Read ·
get_column_cardinalityShows autovacuum settings
Lists autovacuum-related settings from pg_settings.
Try: “What are the autovacuum settings?”
Read ·
list_autovacuum_configurationsShows memory settings
Lists memory-related settings from pg_settings.
Try: “What are the memory settings?”
Read ·
list_memory_configurationsLists server settings
Lists configuration parameters of the PostgreSQL server.
Try: “Show the server configuration.”
Read ·
list_pg_settingsLists tablespaces
Lists the tablespaces in the database.
Try: “What tablespaces exist?”
Read ·
list_tablespacesSummarizes the server state
Fetches the current state of the PostgreSQL server.
Try: “Give me an overview of this database server.”
Read ·
database_overviewLists extensions you could install
Lists PostgreSQL extensions available to install on the server.
Try: “Is pgvector available?”
Read ·
list_available_extensionsLists installed extensions
Lists installed extensions with version, schema and owner.
Try: “Which extensions are installed?”
Read ·
list_installed_extensionsShows replication status
Lists each replica with its state, sync state and lag.
Try: “Are my replicas keeping up?”
Read ·
replication_statsLists replication slots
Lists replication slots with their type, status and the WAL they hold back.
Try: “Is any replication slot holding back WAL?”
Read ·
list_replication_slotsLists tables in publications
Lists the tables included in publications.
Try: “Which tables are published?”
Read ·
list_publication_tablesLists database roles
Lists the user-created roles in the database.
Try: “Which roles exist?”
Read ·
list_roles
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
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
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-only | No 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 to | Your database server |
| Sign-in and keys | Database host, name, user and password go in environment variables on your computer, for example POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD for PostgreSQL. |
| Scopes |
|
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
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 3Hide
- github.com · github.com
- github.com · github.com
- github.com · github.com