MCP Toolbox for Databases is a Model Context Protocol server that connects AI agents, integrated development environments, and applications to databases. It serves two purposes: a ready-to-use server whose prebuilt generic tools (such as listtables and executesql) let an MCP client explore schemas and query data without writing code, and a framework for defining your own database tools with fixed logic for production agents. The repository was renamed from genai-toolbox to mcp-toolbox after the project predated MCP.
Prebuilt tools are selected with a --prebuilt= flag, optionally narrowed to a toolset such as postgres/data. Covered sources include AlloyDB, BigQuery, Cloud SQL for PostgreSQL, MySQL and SQL Server, Spanner, Firestore, and Knowledge Catalog, alongside PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, and Trino.
Custom tools are declared in a tools.yaml file with four resource kinds: source for a database connection, tool for a parameterised action such as a SQL statement, toolset for a named group of tools loaded together, and prompt for reusable message templates. The server reloads configuration changes by default, and clients connect over HTTP at /mcp or per toolset at /mcp/{toolset_name}.
Client SDKs load a toolset directly into an application in Python, JavaScript and TypeScript, Go, and Java, with framework-specific packages for LangChain and LangGraph, LlamaIndex, Genkit, and the Agent Development Kit. The server handles connection pooling, integrated identity and access management authentication, and OpenTelemetry metrics and tracing, and it installs as a binary, container image, Homebrew formula, npm package, Go install, or Gemini CLI extension.
Features
- Prebuilt database tools: generic exploration and query tools per database, enabled with a single flag
- Custom tools framework: tools.yaml defines sources, parameterised tools, toolsets, and prompts
- Wide source coverage: Google Cloud databases plus PostgreSQL, MySQL, Oracle, MongoDB, Redis, Elasticsearch, ClickHouse, Neo4j, Snowflake, Trino, and more
- MCP client support: an HTTP endpoint any MCP-compatible client or IDE can register, including per-toolset URLs
- Client SDKs: Python, JavaScript/TypeScript, Go, and Java packages that load toolsets into an application
- Framework packages: LangChain and LangGraph, LlamaIndex, Genkit, and Agent Development Kit adapters
- Operational features: connection pooling, integrated IAM authentication, and OpenTelemetry metrics and tracing
- Dynamic reloading: configuration changes apply without a restart unless --disable-reload is set
- Install options: binaries for Linux, macOS, and Windows, a container image, Homebrew, npm, Go install, and Gemini CLI extensions
Integrates with
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Codex
Lightweight coding agent that runs in your terminal
LangChain
Framework for building LLM applications and agents from interoperable components and a large integrations library
LlamaIndex
Open-source data framework for building LLM and agentic apps over your own data, with 300+ integrations
