MCP Toolbox for Databases

Google's open-source MCP server for databases: ready tools for Postgres, MySQL, BigQuery, Spanner and more, plus custom tools in tools.yaml

MCP serverEditors’ pickHigh risk

googleapis/mcp-toolbox

Install

{
  "mcpServers": {
    "toolbox-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ]
    }
  }
}

Replace postgres with your database. See the prebuilt configs reference for connection variables.

This is third-party code. Review the repository files before installing.

What it does

Toolbox connects an agent to a database in two ways. With --prebuilt you get standard tools such as list_tables and execute_sql for the chosen database, handy for exploring schemas and writing code. In the second mode tools.yaml defines sources, specific queries, toolsets, prompts and resources so the agent gets only approved operations. The server handles connection pooling, IAM auth and OpenTelemetry tracing, and there are SDKs for ADK, LangChain and LlamaIndex.

Who it is for. For developers and analysts who need agent access to databases, including Google Cloud ones.

Good fit when

  • You want the agent to explore a database schema and write queries
  • You need a production agent limited to predefined queries
  • You work with AlloyDB, BigQuery, Cloud SQL or Spanner

Not a fit when

  • The agent must not run arbitrary SQL and you have no time to define tools by hand
  • You need to work with files rather than a database

Example request

List the tables in the database and write a query that counts orders by month

Limitations

Database connection settings are passed via environment variables; the set depends on the database and is listed in the prebuilt configs reference. Prebuilt tools include execute_sql, so use a read-only account or custom tools on production databases. Local databases need no VPN; Google Cloud database availability from Russia is not guaranteed. The authors consider npx less reliable than the binary or container.

How to disable. Delete the toolbox block from the client's MCP config and stop the toolbox process or container.

MCP

Transport
stdio, http
Authentication
not required

Security check

  • Can run arbitrary SQL against the connected database
  • Handles database credentials

README in short

The README explains the two modes: prebuilt tools and the custom tools framework. It gives an MCP config example for Postgres and walks through tools.yaml sections. It covers installation via binary, container, Homebrew, go install and Gemini CLI extensions, plus SDK integration. Apache-2.0 licensed.

FAQ

Did the project have another name?

Yes, Gen AI Toolbox for Databases; the googleapis/genai-toolbox repository was renamed to mcp-toolbox.

Which databases are supported?

Google Cloud databases plus PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Redis, ClickHouse, Neo4j, Snowflake and more.

Editors’ pick

166 skills for scientific work: bioinformatics, cheminformatics, clinical data, geospatial analysis and 100+ databases

SkillMedium risk44.9K
Editors’ pick

Official Hugging Face skills: Hub operations via the hf CLI, datasets, model training, Spaces, evals and deployment

SkillHigh risk11K
Editors’ pick

A token-lean MCP server for PostgreSQL, MySQL, MariaDB, SQL Server and SQLite with a read-only mode

MCP serverHigh risk3.5K
Editors’ pick

An MCP server and skills from TigerData that help agents write PostgreSQL schemas and queries from current docs and practices

MCP serverMedium risk1.8K