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.
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
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.
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"mcp-toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server",
"--prebuilt=postgres",
"--stdio"
],
"env": {
"POSTGRES_HOST": "${POSTGRES_HOST}",
"POSTGRES_PORT": "5432",
"POSTGRES_DATABASE": "${POSTGRES_DATABASE}",
"POSTGRES_USER": "${POSTGRES_USER}",
"POSTGRES_PASSWORD": "${POSTGRES_PASSWORD}"
}
}
}
}
- On native Windows (not WSL), the reference servers’ READMEs start npx through `cmd /c`: if a server won’t start, use "command": "cmd" with "args": ["/c", "npx", …].
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {
"mcp-toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server",
"--prebuilt=postgres",
"--stdio"
],
"env": {
"POSTGRES_HOST": "<POSTGRES_HOST>",
"POSTGRES_PORT": "5432",
"POSTGRES_DATABASE": "<POSTGRES_DATABASE>",
"POSTGRES_USER": "<POSTGRES_USER>",
"POSTGRES_PASSWORD": "<POSTGRES_PASSWORD>"
}
}
}
}
- Claude Desktop doesn’t read variables in this file: replace <POSTGRES_HOST>, <POSTGRES_DATABASE>, <POSTGRES_USER>, <POSTGRES_PASSWORD> with the real values.
- This file contains your keys once filled in. It lives in your user folder; never commit or share it.
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"mcp-toolbox": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server",
"--prebuilt=postgres",
"--stdio"
],
"env": {
"POSTGRES_HOST": "${env:POSTGRES_HOST}",
"POSTGRES_PORT": "5432",
"POSTGRES_DATABASE": "${env:POSTGRES_DATABASE}",
"POSTGRES_USER": "${env:POSTGRES_USER}",
"POSTGRES_PASSWORD": "${env:POSTGRES_PASSWORD}"
}
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"inputs": [
{
"type": "promptString",
"id": "postgres-host",
"description": "POSTGRES_HOST",
"password": true
},
{
"type": "promptString",
"id": "postgres-database",
"description": "POSTGRES_DATABASE",
"password": true
},
{
"type": "promptString",
"id": "postgres-user",
"description": "POSTGRES_USER",
"password": true
},
{
"type": "promptString",
"id": "postgres-password",
"description": "POSTGRES_PASSWORD",
"password": true
}
],
"servers": {
"mcp-toolbox": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server",
"--prebuilt=postgres",
"--stdio"
],
"env": {
"POSTGRES_HOST": "${input:postgres-host}",
"POSTGRES_PORT": "5432",
"POSTGRES_DATABASE": "${input:postgres-database}",
"POSTGRES_USER": "${input:postgres-user}",
"POSTGRES_PASSWORD": "${input:postgres-password}"
}
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"mcp-toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server",
"--prebuilt=postgres",
"--stdio"
],
"env": {
"POSTGRES_HOST": "${env:POSTGRES_HOST}",
"POSTGRES_PORT": "5432",
"POSTGRES_DATABASE": "${env:POSTGRES_DATABASE}",
"POSTGRES_USER": "${env:POSTGRES_USER}",
"POSTGRES_PASSWORD": "${env:POSTGRES_PASSWORD}"
}
}
}
}
- Devin’s docs confirm ${env:…} references for the legacy Cascade agent; for the default Devin Local agent they only document them in OAuth settings. If a server can’t authenticate, check Devin’s MCP docs.
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
More MCP servers
- Neon MCP ServerLets an assistant manage Neon Postgres projects and branches, run SQL, and test schema migrations on a temporary branch first.
- Prisma MCP serverLets an assistant create and query Prisma Postgres databases, restore backups, and manage Prisma Compute apps and Object Storage.
- MongoDB MCP ServerLets an assistant query and manage MongoDB databases and, with Atlas credentials, manage Atlas projects, clusters and users.
- Redis MCP ServerLets an assistant read and write Redis data types, streams and JSON documents, and run vector search on a Redis database.
- ClickHouse MCP ServerLets an assistant list ClickHouse databases and tables and run SQL queries, read-only by default, plus optional embedded chDB queries.
- DuckDB / MotherDuck Local MCP ServerLets an assistant run DuckDB SQL on local files, in-memory databases, S3-hosted databases or MotherDuck, read-only unless you allow writes.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?