MCP Toolbox for Databases
io.github.googleapis由 GitHub 账号 googleapis 发布v1.16.0更新于 Nov 6, 2026
MCP Toolbox for Databases enables your agent to connect to your database.
概览
开源 MCP 服务器,让 AI 助手连接企业级与开源数据库,进行表结构探索、SQL 查询和自定义工具调用。
- 可以做什么
- 用预置通用工具列出数据表并执行 SQL 查询
- 在 IDE 或命令行中探索表结构并生成贴合数据库的代码
- 按需只加载指定工具集,例如仅加载某个数据库的 SQL 工具
- 在 YAML 配置中定义自定义工具、数据源、工具集、提示词和只读资源
- 通过 Python、JavaScript、Go 及各类智能体框架的客户端 SDK 向应用提供工具
- 把工具集生成为可移植的 Agent Skill,并通过 OpenTelemetry 导出追踪与指标
- 适用场景
- 适合希望助手用自然语言查询或探索数据库的场景,也适合团队向生产智能体只暴露经过限制和定制的 SQL 工具,而不是直接开放数据库访问。
- 运行要求
- 以二进制、容器镜像、Homebrew、Go 源码或 npx(需 Node.js)方式在本机运行。需要 tools.yaml 配置文件或预置数据库参数,以及各数据源的连接信息和凭据;Google Cloud 数据源可使用 IAM 认证。
安装
在 SourceWeft 中
- 打开 控制台中的 MCP Toolbox for Databases,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP Toolbox for Databases
[googleapis%2Fmcp-toolbox | Trendshift]
MCP Toolbox for Databases is an open source Model Context Protocol (MCP) server that connects your AI agents, IDEs, and applications directly to your enterprise databases.
It serves a dual purpose:
- Ready-to-use MCP Server (Build-Time): Instantly connect Gemini CLI, Google Antigravity, Claude Code, Codex, or other MCP clients to your databases using our prebuilt generic tools. Talk to your data, explore schemas, and generate code without writing boilerplate.
- Custom Tools Framework (Run-Time): A robust framework to build specialized, highly secure AI tools for your production agents. Define structured queries, semantic search, and NL2SQL capabilities safely and easily.
This README provides a brief overview. For comprehensive details, see the full documentation.
[!IMPORTANT]
Repository Name Update: Thegenai-toolboxrepository has been officially renamed tomcp-toolbox. To ensure your local environment reflects the new name, you may update your remote:git remote set-url origin https://github.com/googleapis/mcp-toolbox.git
[!NOTE] This solution was originally named “Gen AI Toolbox for Databases” (github.com/googleapis/genai-toolbox) as its initial development predated MCP, but was renamed to align with the MCP compatibility.
Table of Contents
- Why MCP Toolbox?
- Quick Start: Prebuilt Tools
- Quick Start: Custom Tools
- Install & Run the Toolbox server
- Connect to Toolbox
- Additional Features
- Versioning
- Contributing
- Community
Why MCP Toolbox?
- Out-of-the-Box Database Access: Prebuilt generic tools for instant data exploration (e.g.,
list_tables,execute_sql) directly from your IDE or CLI. - Custom Tools Framework: Build production-ready tools with your own predefined logic, ensuring safety through Restricted Access, Structured Queries, and Semantic Search.
- Simplified Development: Integrate tools into your Agent Development Kit (ADK), LangChain, LlamaIndex, or custom agents in less than 10 lines of code.
- Better Performance: Handles connection pooling, integrated auth (IAM), and end-to-end observability (OpenTelemetry) out of the box.
- Enhanced Security: Integrated authentication for more secure access to your data.
- End-to-end Observability: Out of the box metrics and tracing with built-in support for OpenTelemetry.
Quick Start: Prebuilt Tools
Stop context-switching and let your AI assistant become a true co-developer. By connecting your IDE to your databases with MCP Toolbox, you can query your data in plain English, automate schema discovery and management, and generate database-aware code.
You can use the Toolbox in any MCP-compatible IDE or client (e.g., Gemini CLI, Google Antigravity, Claude Code, Codex, etc.) by configuring the MCP server.
Prebuilt tools are also conveniently available via the Google Antigravity MCP Store with a simple click-to-install experience.
-
Add the following to your client's MCP configuration file (usually
mcp.jsonorclaude_desktop_config.json): -
Set the appropriate environment variables to connect, see the Prebuilt Tools Reference.
When you run Toolbox with a --prebuilt=<database> flag, you instantly get access to standard tools to interact with that database. You can also specify a specific toolset using the --prebuilt=<database>/<toolset> syntax (e.g., --prebuilt=postgres/data to only load SQL tools).
Supported databases currently include:
- Google Cloud: AlloyDB, BigQuery, Cloud SQL (PostgreSQL, MySQL, SQL Server), Spanner, Firestore, Knowledge Catalog (formerly known as Dataplex).
- Other Databases: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, Trino, and more.
For a full list of available tools and their capabilities across all supported databases, see the Prebuilt Tools Reference.
See the Install & Run the Toolbox server section for different execution methods like Docker or binaries.
[!TIP] For users looking for a managed solution, Google Cloud MCP Servers provide a managed MCP experience with prebuilt tools; you can learn more about the differences here.
Quick Start: Custom Tools
Toolbox can also be used as a framework for customized tools.
The primary way to configure Toolbox is through the tools.yaml file. If you
have multiple files, you can tell Toolbox which to load with the --config tools.yaml flag.
You can find more detailed reference documentation to all resource types in the Resources.
Sources
The sources section of your tools.yaml defines what data sources your
Toolbox should have access to. Most tools will have at least one source to
execute against.
For more details on configuring different types of sources, see the Sources.
Tools
The tools section of a tools.yaml define the actions an agent can take: what
type of tool it is, which source(s) it affects, what parameters it uses, etc.
For more details on configuring different types of tools, see the Tools.
Toolsets
The toolsets section of your tools.yaml allows you to define groups of tools
that you want to be able to load together. This can be useful for defining
different groups based on agent or application.
Prompts
The prompts section of a tools.yaml defines prompts that can be used for
interactions with LLMs.
For more details on configuring prompts, see the Prompts.
Resources
The resources and resourceTemplates sections of your tools.yaml define read-only
content, files, or parameterized directory trees that can be discovered and retrieved
by MCP clients:
For more details on configuring resources and resource templates, see Resources.
Install & Run the Toolbox server
You can run Toolbox directly with a configuration file:
This runs the latest version of the Toolbox server with your configuration file.
[!NOTE] This method is optimized for convenience rather than performance. For a more standard and reliable installation, please use the binary or container image as described in Install & Run the Toolbox server.
Install Toolbox
For the latest version, check the releases page and use the following instructions for your OS and CPU architecture.
Binary
To install Toolbox as a binary:
Linux (AMD64)
To install Toolbox as a binary on Linux (AMD64):
macOS (Apple Silicon)
To install Toolbox as a binary on macOS (Apple Silicon):
macOS (Intel)
To install Toolbox as a binary on macOS (Intel):
Windows (Command Prompt)
To install Toolbox as a binary on Windows (Command Prompt):
Windows (PowerShell)
To install Toolbox as a binary on Windows (PowerShell):
Windows ARM64 (Command Prompt)
To install Toolbox as a binary on Windows ARM64 (Command Prompt):
Windows ARM64 (PowerShell)
To install Toolbox as a binary on Windows ARM64 (PowerShell):
Container image
You can also install Toolbox as a container:Homebrew
To install Toolbox using Homebrew on macOS or Linux:
Compile from source
To install from source, ensure you have the latest version of Go installed, and then run the following command:
Gemini CLI
Check out the [Gemini CLI extensions](https://geminicli.com/extensions/) to install prebuilt tools for specific databases like AlloyDB, BigQuery, and Cloud SQL directly into Gemini CLI.Interact with your custom tools using natural language through the Gemini CLI.
Run Toolbox
Configure a tools.yaml to define your tools, and then
execute toolbox to start the server:
Binary
To run Toolbox from binary:
ⓘ Note
Toolbox enables dynamic reloading by default. To disable, use the--disable-reloadflag.
Container image
To run the server after pulling the container image:
ⓘ Note
The-vflag mounts your localtools.yamlinto the container, and-pmaps the container's port5000to your host's port5000.
Source
To run the server directly from source, navigate to the project root directory and run:
ⓘ Note
This command runs the project from source, and is more suitable for development and testing. It does not compile a binary into your$GOPATH. If you want to compile a binary instead, refer the Developer Documentation.
Homebrew
If you installed Toolbox using Homebrew, the toolbox
binary is available in your system path. You can start the server with the same
command:
NPM
To run Toolbox directly without manually downloading the binary (requires Node.js):
Gemini CLI
After installing a [Gemini CLI extensions](https://geminicli.com/extensions/), the prebuilt tools will be available during use.You can use toolbox help for a full list of flags! To stop the server, send a
terminate signal (ctrl+c on most platforms).
For more detailed documentation on deploying to different environments, check out the resources in the Deploy Toolbox section
Connect to Toolbox
Once your Toolbox server is up and running, you can load tools into your MCP-compatible client or application.
MCP Client
Add the following configuration to your MCP client configuration:
If you would like to connect to a specific toolset, replace url with "http://127.0.0.1:5000/mcp/{toolset_name}".
Toolbox SDKs: Integrate with your Application
Toolbox Client SDKs provide the easy-to-use building blocks and advanced features for connecting your custom applications to the MCP Toolbox server. See below the list of Client SDKs for using various frameworks:
Python (Github)
Core
Install Toolbox Core SDK:
Load tools:
For more detailed instructions on using the Toolbox Core SDK, see the project's README.
LangChain / LangGraph
Install Toolbox LangChain SDK:
Load tools:
For more detailed instructions on using the Toolbox LangChain SDK, see the project's README.
LlamaIndex
Install Toolbox Llamaindex SDK:
Load tools:
For more detailed instructions on using the Toolbox Llamaindex SDK, see the project's README.
Javascript/Typescript (Github)
Core
Install Toolbox Core SDK:
Load tools:
For more detailed instructions on using the Toolbox Core SDK, see the project's README.
LangChain / LangGraph
Install Toolbox Core SDK:
Load tools:
Genkit
Install Toolbox Core SDK:
Load tools:
ADK
Install Toolbox ADK SDK:
Load tools:
For more detailed instructions on using the Toolbox ADK SDK, see the project's README.
Go (Github)
Core
Install Toolbox Go SDK:
Load tools:
For more detailed instructions on using the Toolbox Go SDK, see the project's README.
LangChain Go
Install Toolbox Go SDK:
Load tools:
Genkit
Install Toolbox Go SDK:
Load tools:
Go GenAI
Install Toolbox Go SDK:
Load tools:
OpenAI Go
Install Toolbox Go SDK:
Load tools:
ADK Go
Install Toolbox Go SDK:
Load tools:
For more detailed instructions on using the Toolbox Go SDK, see the project's README.
Additional Features
Test tools with the Toolbox UI
To launch Toolbox's interactive UI, use the --ui flag. This allows you to test
tools and toolsets with features such as authorized parameters. To learn more,
visit Toolbox UI.
Telemetry
Toolbox emits traces and metrics via OpenTelemetry. Use --telemetry-otlp=<endpoint>
to export to any OTLP-compatible backend like Google Cloud Monitoring, Agnost AI, or
others. See the telemetry docs for details.
Generate Agent Skills
The skills-generate command allows you to convert a toolset into an Agent Skill compatible with the Agent Skill specification. This is useful for distributing tools as portable skill packages.
Once generated, you can install the skill into the Gemini CLI:
For more details, see the Generating Skills guide. To serve a skill you already have over MCP, see Serving Skills over MCP.
The repository also ships ready-to-use Agent Skills (e.g. maintainer workflows). See skills/ for the catalog and install instructions.
Versioning
MCP Toolbox for Databases follows Semantic Versioning.
The Public API includes the Toolbox Server (CLI, configuration manifests, and pre-built toolsets) and the Client SDKs.
- Major versions are incremented for breaking changes, such as incompatible CLI or manifest changes.
- Minor versions are incremented for new features, including modifications to pre-built toolsets or beta features.
- Patch versions are incremented for backward-compatible bug fixes.
For more details, including our Container Tagging Policy, see our Full Versioning Policy.
Contributing
Contributions are welcome. Please, see the CONTRIBUTING guide to get started.
For technical details on setting up a environment for developing on Toolbox itself, see the DEVELOPER guide.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Contributor Code of Conduct for more information.
Community
Join our Discord community to connect with our developers!
来源:README.md,提交 06ea49d
工具
0版本历史
7- v1.16.0最新Nov 6, 2026
- v1.15.0Oct 23, 2026
- v1.14.0Oct 9, 2026
- v1.13.1Sep 26, 2026
- v1.13.0Sep 25, 2026
- v1.12.0Sep 18, 2026
- v1.11.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分