
MCP 資料庫工具箱
Google 官方開源的 MCP 伺服器,透過簡單的聲明式配置,安全地將 AI 代理、整合開發環境 (IDE) 和應用程式連接到企業資料庫,例如 BigQuery、Cloud SQL、AlloyDB、Spanner、PostgreSQL 以及更多其他資料庫。
概覽
MCP 資料庫工具箱(儲存庫:googleapis/mcp-toolbox)是 Google 專為資料庫設計的開源 模型情境協定 (MCP) 伺服器。它讓 AI 代理、整合開發環境 (IDE) 及應用程式能使用自然語言與結構化工具,直接且安全地與企業資料來源互動——大多數情境無需編寫自訂整合程式碼。
該專案先前名為 Gen AI Toolbox,後更名以更好地反映其與 MCP 生態系統的深度整合。工具以宣告方式定義於 tools.yaml 檔案中,伺服器負責處理連線管理、身份驗證、查詢執行及安全性。
主要功能
. 廣泛的資料庫支援:原生整合 Google Cloud(BigQuery、Cloud SQL for PostgreSQL/MySQL/SQL Server、AlloyDB、Spanner、Firestore)及許多第三方來源,包括 PostgreSQL、MySQL、Oracle、MongoDB、Redis、Elasticsearch、Snowflake、Neo4j、Trino 等。
. 預建通用工具:即開即用的工具,如 list_tables、execute_sql、結構描述探索及資料查詢。
. 自訂工具框架:透過配置定義結構化查詢、語意搜尋、自然語言轉 SQL (NL2SQL) 及領域特定工具。
. 企業級安全性:基於 IAM 的身份驗證、限制存取、參數化查詢及最小權限執行。
. 可觀測性:內建 OpenTelemetry 支援以提供指標與追蹤。
. 動態重載與工具集:無需重新啟動即可更新工具;將工具分組為模組化工具集。
. 互動式使用者介面:內建 Web UI 供測試工具使用(透過 --ui 旗標啟用)。
. SDK 生態系統:官方用戶端 SDK 涵蓋 Python、JavaScript/TypeScript、Java 及 Go,可將工具箱工具整合至代理框架,如 LangChain、LlamaIndex 及 Genkit。
. 代理技能生成:將工具集轉換為可移植的代理技能。
運作方式
- 在
tools.yaml中配置資料來源與工具(來源、工具、工具集、提示)。 - 啟動 MCP 工具箱伺服器(可執行檔、Docker 或雲端部署)。它會公開一個 MCP 端點(預設:
http://127.0.0.1:5000/mcp)。 - MCP 用戶端(如 Gemini CLI、Claude Code、Cursor 等)發現並呼叫工具。
- 伺服器在正確的身份驗證與連線池管理下,對資料庫執行操作,並將結構化結果回傳給代理。
同時支援基於 HTTP 的 MCP 連線及預先建構的工具配置,以便快速設定。
使用情境
- 自然語言資料查詢:AI 助手使用通俗英文查詢與分析即時資料。
- 結構感知開發:IDE 與代理程式探索結構並產生準確的資料庫程式碼。
- 安全的企業 AI 代理:建構能在受控存取下與敏感資料互動的生產級代理。
- 自動化程式碼與查詢生成:生成符合實際結構的 SQL、遷移指令或應用程式邏輯。
- 資料探索與分析:結合 LLM 進行資料洞察、報表製作或除錯資料問題。
- 多資料庫工作流程:在單一 MCP 伺服器中統一存取多種異質資料來源。
快速入門
安裝選項
- 二進位檔:從 GitHub 或 Google Cloud Storage 下載最新版本。
- Homebrew:
brew install mcp-toolbox - Docker:從
us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox拉取映像檔 - Go:
go install github.com/googleapis/mcp-toolbox@latest - 透過 npx 預建:針對特定資料庫的快速設定。
執行方式:
./toolbox --config tools.yaml
加入您的 MCP 客戶端設定(HTTP 模式或預建範例):
{
"mcpServers": {
"toolbox": {
"type": "http",
"url": "http://127.0.0.1:5000/mcp"
}
}
}
完整文件:https://mcp-toolbox.dev/
優勢
MCP Toolbox 顯著降低了建構具資料感知能力的 AI 代理的門檻,同時滿足企業在安全性、擴展性與可觀測性方面的需求。它已具備生產就緒能力(v1.0.0 版本於 2026 年 4 月發布),由 Google 積極維護,並可作為安全 MCP 資料庫整合的參考實作。
支援數十種資料來源並擁有豐富的 SDK 生態系統,使開發者能夠建立強大、可靠的代理應用程式,在真實的企業資料上運作。
Tags
Related Entries
Keep exploring similar tools and resources in this category.
TinyFish
MCP ServersTinyFish exposes web automation, web search, content extraction, and remote browser-session tools to MCP-compatible AI assistants. The hosted MCP server uses OAuth 2.1, while an optional local @tiny-fish/mcp proxy supports API-key authentication for local-only, CI, and headless setups.

openaiDeveloperDocs
MCP ServersOpenAI Developer Docs MCP is an OpenAI-hosted, read-only server that lets MCP clients search and fetch documentation from developers.openai.com, platform.openai.com, and learn.chatgpt.com. It uses a public streamable HTTP endpoint and does not call the OpenAI API on the user's behalf.

FetchSandbox
MCP ServersFetchSandbox is a stdio MCP server and hosted API-sandbox service that lets AI coding agents import OpenAPI 3.x specifications, discover runnable workflows, and execute stateful integration tests without using production API credentials. It is designed for validating request flows, lifecycle state, webhooks, retries, and shareable run traces from MCP-compatible development tools.
DataForSEO MCP Server
MCP ServersDataForSEO MCP Server is the official Model Context Protocol server for connecting AI clients to DataForSEO SEO, SERP, keyword, backlink, on-page, business, domain, content, merchant, and AI optimization data. It can be used as a hosted Streamable HTTP endpoint, a local npx package, a Docker container, or a source-built TypeScript server.
Related Reads
Background, tutorials, and protocol context connected to this entry.



