Mcp Toolbox
MCP Toolbox for Databases is an open source MCP server for databases.
Last verified:
What is Mcp Toolbox?
MCP Toolbox for Databases is an open source Model Context Protocol (MCP) server that connects AI agents, IDEs, and applications directly to enterprise databases. It serves a dual purpose: as a ready-to-use MCP Server for build-time scenarios where developers can instantly connect Gemini CLI, Google Antigravity, Claude Code, or Codex to databases using prebuilt generic tools, and as a custom tools framework for run-time production agents requiring specialized, secure AI tools.
The tool offers prebuilt tools like list_tables and execute_sql for instant data exploration without writing boilerplate, while also providing a robust framework to build production-ready custom tools with predefined logic ensuring safety through restricted access, structured queries, and semantic search. It handles connection pooling, integrated authentication (IAM), and end-to-end observability with OpenTelemetry out of the box, simplifying Gen AI tool development for databases in less than 10 lines of code.
MCP Toolbox supports an extensive range of databases including Google Cloud platforms (BigQuery, AlloyDB, Spanner, Cloud SQL for PostgreSQL/MySQL/SQL Server, Firestore, Bigtable, Dataplex), generic relational databases (PostgreSQL, MySQL, Microsoft SQL Server, Oracle, ClickHouse, TiDB, SQLite, CockroachDB), NoSQL stores (MongoDB, Redis, Elasticsearch, Couchbase), graph databases (Neo4j), and data federation platforms (Trino, Looker). It is framework-agnostic with native SDK support for LangChain, LlamaIndex, Genkit, and Google Agent Development Kit across Python, JavaScript/TypeScript, Go, and OpenAI.
This tool is designed for software developers building AI agents, DevOps engineers managing database connections, data engineers creating Gen AI applications, and teams using MCP-compatible IDEs like Cursor, Claude Desktop, VS Code, Cline, Roo, and Windsurf. It is particularly valuable for build-time agents in IDEs that need to automate database schema discovery, generate migration scripts, create test data, explore data using natural language, and perform database administration tasks without manual SQL writing.
Mcp Toolbox pricing
Pricing model: Freemium
MCP Toolbox for Databases is completely free and open source with no paid tiers. The repository is hosted publicly on GitHub under googleapis/mcp-toolbox. All features including prebuilt tools, custom tools framework, SDKs for Python/JavaScript/Go, OpenTelemetry integration, and interactive UI are available at no cost. For users wanting a managed experience, Google Cloud MCP Servers provides a managed MCP experience with prebuilt tools as a separate paid Google Cloud service, but the open source Toolbox server itself has no pricing.
Mcp Toolbox pros
- Open source with no licensing costs
- Prebuilt tools work out of the box instantly
- Supports 30+ database platforms including Google Cloud
- Framework-agnostic MCP protocol implementation
- Client SDKs for Python, JavaScript/TypeScript, and Go
- Native LangChain and LlamaIndex integration support
- Built-in connection pooling handled automatically
- Integrated authentication with IAM and OAuth2 support
- OpenTelemetry support for metrics and tracing
- Secure custom tools with prepared statements
- Works with Gemini CLI, Claude Code, and Cursor IDE
- Dynamic tool reloading without server restart
- HTTP and stdio transport modes available
- Interactive UI for testing tools with --ui flag
- Binary, Docker, Homebrew, and source installation options
- Authenticated parameters from OIDC tokens
- Authorized invocations with authRequired field
- Agent Skill generation for portable tool packages
- Template parameters for dynamic SQL identifiers
- Tool annotations for MCP client semantic metadata
Mcp Toolbox cons
- Prebuilt tools unsafe for production without custom wrappers
- Arbitrary SQL execution dangerous with prompt injection risk
- Requires tools.yaml configuration for custom tools
- npx method optimized for convenience not performance
- Learning curve for YAML tool configuration syntax
- Limited NoSQL support compared to SQL databases
- No built-in GUI database browser like traditional tools
- Authentication setup requires Cloud IAM knowledge for Google Cloud
- Runtime tool fetching adds latency vs static tools
- Template parameters prone to SQL injection without allowedValues
Frequently asked questions about Mcp Toolbox
What is MCP Toolbox for Databases?
MCP Toolbox for Databases is an open source Model Context Protocol (MCP) server that connects AI agents, IDEs, and applications directly to enterprise databases. It provides prebuilt generic tools for instant data exploration and a custom tools framework for building secure production-ready AI tools with predefined queries and semantic search capabilities.
What databases does MCP Toolbox support?
MCP Toolbox supports Google Cloud databases (BigQuery, AlloyDB, Spanner, Cloud SQL for PostgreSQL/MySQL/SQL Server, Firestore, Bigtable, Dataplex), generic databases (PostgreSQL, MySQL, Microsoft SQL Server, Oracle, ClickHouse, TiDB, SQLite, CockroachDB, Firebird, OceanBase, YugabyteDB), NoSQL stores (MongoDB, Redis, Elasticsearch, Couchbase), graph databases (Neo4j), and federation platforms (Trino, Looker).
What is the difference between prebuilt and custom tools?
Prebuilt tools are ready-to-use out-of-the-box with fixed parameters like postgres-execute-sql that allows arbitrary SQL execution, ideal for development and prototyping. Custom tools are defined in tools.yaml with prepared statements and bound parameters that restrict the agent to specific actions, making them safe for production use by reducing attack surface from prompt injection.
How do I install MCP Toolbox?
You can install MCP Toolbox via binary download for your OS, Docker container image from Google Cloud Artifact Registry, Homebrew on macOS/Linux with brew install mcp-toolbox, NPM with npx @toolbox-sdk/server, or compile from source using Go with go install github.com/googleapis/[email protected]. Each method requires configuring a tools.yaml file for custom tools or using --prebuilt flag for prebuilt tools.
What SDKs are available for application integration?
MCP Toolbox provides Client SDKs for Python (toolbox-core, toolbox-langchain, toolbox-llamaindex), JavaScript/TypeScript (@toolbox-sdk/core, @toolbox-sdk/adk), Go (github.com/googleapis/mcp-toolbox-sdk-go with LangChain Go, Genkit Go, OpenAI Go, ADK Go support), all supporting framework-agnostic tool loading and integration with LangChain, LlamaIndex, Genkit, Google Agent Development Kit, and OpenAI.
Is MCP Toolbox safe for production use?
Prebuilt tools with arbitrary SQL execution are dangerous in production due to prompt injection risks. For production, use custom tools defined in tools.yaml with prepared statements, bound parameters, authenticated parameters from OIDC tokens, authorized invocations with authRequired, and allowedValues restrictions on template parameters to minimize SQL injection risk and restrict agent capabilities to safe boundaries.
How do I connect MCP Toolbox to my IDE?
Configure your MCP-compatible IDE (Cursor, Claude Desktop, VS Code, Cline, Roo, Windsurf) by adding the Toolbox server to your mcp.json or claude_desktop_config.json with command npx and args pointing to @toolbox-sdk/server with --prebuilt flag for your database type, or use HTTP transport at http://1270.0.1:5000/mcp for locally running Toolbox server.
What authentication methods does MCP Toolbox support?
Toolbox supports Workload Identity through Application Default Credentials (ADC) for Google Cloud, User Identity via OAuth2, API Keys for various services, and authenticated parameters that auto-populate from OIDC token claims like the sub field for user ID. Authentication is configured in the sources section of tools.yaml with service-specific credentials.
How do I create a custom tool?
Create a tools.yaml file with sections for sources (database connection config), tools (action definitions with name, type like postgres-sql, source reference, statement SQL, description, and parameters), optionally toolsets to group tools, and prompts for LLM interactions. Run the server with toolbox --config tools.yaml or npx @toolbox-sdk/server --config tools.yaml to load your custom tools.
Does MCP Toolbox support observability and monitoring?
Yes, Toolbox provides built-in OpenTelemetry support for traces and metrics. Use the --telemetry-otlp=<endpoint> flag to export to any OTLP-compatible backend like Google Cloud Monitoring or Agnost AI. This gives you end-to-end observability of tool invocations, query performance, and agent behavior out of the box without additional configuration.