talira

MCP Toolbox for Databases

An open source MCP server for databases

open sourceApache-2.0self-hostablefreeMCP

MCP Toolbox for Databases is Google's Apache-2.0 MCP server, written in Go, that sits between AI agents or IDEs and your databases. Run with --prebuilt=<database> it gives MCP clients such as Gemini CLI, Google Antigravity, Claude Code and Codex generic tools like list_tables and execute_sql; as a framework, you define your own tools in tools.yaml (a source, a parameterised SQL statement, a description), group them into toolsets, and agents can only run those queries. It handles connection pooling, IAM and OIDC authentication and OpenTelemetry tracing, and supports Google Cloud databases (AlloyDB, BigQuery, Cloud SQL, Spanner, Firestore) and others including PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, ClickHouse, Neo4j, Snowflake and Trino. Client SDKs in Python, JavaScript/TypeScript, Go and Java load the tools into ADK, LangChain, LlamaIndex or custom agents; it was first called Gen AI Toolbox for Databases (googleapis/genai-toolbox).

Ways to install

Problems it solves

  • let Claude Code or Gemini CLI list tables and run SQL against our Postgres while I write code
  • give a production agent only a fixed set of parameterised SQL queries instead of free-form SQL access
  • define database tools for an AI agent in a YAML file instead of writing a custom MCP server
  • connect an AI agent to BigQuery, AlloyDB or Spanner with Google Cloud IAM authentication
  • one MCP server that works across Postgres, MySQL, SQL Server, Oracle and MongoDB
  • pass the signed-in user's identity into the queries an agent runs so it only sees their rows
  • trace and measure every database call my agent makes with OpenTelemetry
  • load the same database tools into LangChain, LlamaIndex or Google ADK agents from Python, TypeScript, Go or Java
  • connection pooling for an AI agent that hits our database on every turn
  • self-host the database MCP server on Cloud Run or Kubernetes next to our databases

Features

  • prebuilt tools per database (--prebuilt=postgres, toolsets like postgres/data): list_tables, execute_sql and more
  • custom tools in tools.yaml: sources, parameterised SQL tools, toolsets and prompts
  • Google Cloud sources: AlloyDB, BigQuery, Cloud SQL (PostgreSQL, MySQL, SQL Server), Spanner, Firestore, Knowledge Catalog
  • other sources: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, Trino
  • semantic search and NL2SQL tools (such as alloydb-ai-nl)
  • connection pooling, IAM auth, Google Sign-In and generic OIDC auth services
  • OpenTelemetry metrics and tracing
  • stdio and HTTP MCP endpoints, per-toolset URLs
  • client SDKs: Python (core, LangChain, LlamaIndex, ADK), JavaScript/TypeScript (core, ADK), Go, Java
  • binaries for Linux, macOS and Windows, a container image, npx and Homebrew
View 1 more
  • deploy guides for Cloud Run, Docker Compose and Kubernetes

Limitations

  • Doesn't come as a managed service: it's open source and self-hosted; Google Cloud MCP Servers are Google's managed option2

Capabilities

Has a command line toolplan not known
Has an MCP serverplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what MCP Toolbox for Databases does.

  1. pgEdge Postgres MCP Server A PostgreSQL MCP server with a Natural Language Agent CLI and Web UI
  2. Postgres MCP Pro A Postgres MCP server with index tuning, explain plans, health checks, and safe SQL execution
  3. mcp-server-mysql MCP server that lets Claude and other LLMs inspect MySQL schemas and run queries, read-only by default
  4. Open Source MCP Servers for AWS A suite of open source MCP servers that connect AI assistants to AWS services, docs and best practices
  5. MySQL MCP Server Python MCP server for exploring and querying MySQL databases from AI assistants

Compare MCP Toolbox for Databases with the top 3