MCP Toolbox for Databases
by googleapis
Google's MCP Toolbox for Databases wires an AI agent up to 20+ databases with connection pooling, IAM auth, and either prebuilt or custom SQL tools.
Run with npx
npx @toolbox-sdk/server --config tools.yaml
About
MCP Toolbox for Databases is a standalone MCP server, not a library you embed, that sits between an agent and your actual database, handling connection pooling and IAM-based authentication so the model never touches credentials directly. Point it at a YAML config and it exposes prebuilt, ready-to-use tools like list_tables and execute_sql against any of 20-plus supported databases: PostgreSQL, MySQL, BigQuery, AlloyDB, Cloud SQL, MongoDB, Redis, and more.
For production use it also has a Custom Tools Framework, where you define specific, scoped tools in that same YAML file, such as a fixed query, a semantic search, or an NL2SQL endpoint, so an agent gets exactly the database access you intend rather than an open SQL console. It ships OpenTelemetry support for observability and plugs into LangChain, LlamaIndex, and the usual MCP clients like Claude Code, Gemini CLI, and Codex out of the box.
Key features
- Prebuilt, ready-to-use tools (list_tables, execute_sql) for 20+ databases
- Connection pooling and IAM authentication handled by the server, not the agent
- Custom Tools Framework for defining scoped, YAML-configured production tools
- Support for structured queries, semantic search, and NL2SQL tool definitions
- OpenTelemetry observability support out of the box
- Official SDKs for Python, JavaScript, and Go for embedding toolbox calls in an app
Use cases
- Letting an agent query a production database in plain English without exposing raw credentials
- Restricting an agent to a fixed set of vetted queries instead of arbitrary SQL
- Standing up NL2SQL over BigQuery or AlloyDB for an internal analytics assistant
- Wiring the same database access into both an MCP client and a LangChain app via the SDKs
Available tools
list_tables
Prebuilt tool that returns the tables available in the connected database.
execute_sql
Prebuilt tool that runs a SQL statement against the connected database.
Custom SQL tools
YAML-defined, scoped queries you expose instead of raw SQL access.
NL2SQL tools
Custom tool type for translating natural language into a database query.
Frequently asked questions
Can I restrict what an agent is allowed to query?
Yes. The Custom Tools Framework lets you define specific, scoped tools in YAML instead of exposing the generic execute_sql tool.
Does it support authentication other than passwords?
Yes. It integrates with IAM-based auth for supported cloud databases, so the agent doesn't need direct credentials.