docs: make Chinese README the default
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 11:09:23 +00:00
parent 77425a7cac
commit e3eb629236
+180 -180
View File
@@ -1,3 +1,9 @@
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/googleapis/mcp-toolbox) · [上游 README](https://github.com/googleapis/mcp-toolbox/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
<div align="center">
![logo](./logo.png)
@@ -19,63 +25,63 @@
[![Java SDK](https://img.shields.io/maven-central/v/com.google.cloud.mcp/mcp-toolbox-sdk-java?logo=apache-maven&logoColor=white&label=Java%20SDK)](https://mvnrepository.com/artifact/com.google.cloud.mcp/mcp-toolbox-sdk-java)
</div>
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.
MCP Toolbox for Databases 是一款开源的 Model Context ProtocolMCP)服务器,可将你的 AI 智能体、IDE 和应用程序直接连接至企业数据库。
<p align="center">
<img src="docs/en/documentation/introduction/architecture.png" alt="architecture" width="50%"/>
</p>
It serves a **dual purpose**:
1. **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.
2. **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.
它具有**双重用途**
1. **开箱即用的 MCP 服务器(构建时,Build-Time):** 使用我们*预构建的通用工具*,即可让 Gemini CLIGoogle AntigravityClaude CodeCodex 或其他 MCP 客户端即时连接你的数据库。无需编写样板代码,即可与数据对话、探索 schema 并生成代码。
2. **自定义工具框架(运行时,Run-Time):** 一套稳健的框架,用于为生产环境中的智能体构建专用、高安全性的 AI 工具。可安全、便捷地定义结构化查询、语义搜索和 NL2SQL 能力。
This README provides a brief overview. For comprehensive details, see the [full documentation](https://mcp-toolbox.dev/).
README 提供简要概览。如需全面了解,请参阅[完整文档](https://mcp-toolbox.dev/).
> [!IMPORTANT]
> **Repository Name Update:** The `genai-toolbox` repository has been officially renamed to `mcp-toolbox`. To ensure your local environment reflects the new name, you may update your remote:
> **仓库名称更新:** `genai-toolbox` 仓库已正式更名为 `mcp-toolbox`。为确保本地环境反映新名称,你可以更新远程地址:
> `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.
> 该解决方案最初名为「Gen AI Toolbox for Databases」(github.com/googleapis/genai-toolbox),因其最初开发早于 MCP,后已更名以与 MCP 兼容对齐。
<!-- TOC ignore:true -->
## Table of Contents
## 目录
- [Why MCP Toolbox?](#why-mcp-toolbox)
- [Quick Start: Prebuilt Tools](#quick-start-prebuilt-tools)
- [Quick Start: Custom Tools](#quick-start-custom-tools)
- [Install & Run the Toolbox server](#install--run-the-toolbox-server)
- [Connect to Toolbox](#connect-to-toolbox)
- [MCP Client](#mcp-client)
- [Toolbox SDKs: Integrate with your Application](#toolbox-sdks-integrate-with-your-application)
- [Additional Features](#additional-features)
- [Versioning](#versioning)
- [Contributing](#contributing)
- [Community](#community)
- [为何选择 MCP Toolbox](#why-mcp-toolbox)
- [快速入门:预构建工具](#quick-start-prebuilt-tools)
- [快速入门:自定义工具](#quick-start-custom-tools)
- [安装并运行 Toolbox 服务器](#install--run-the-toolbox-server)
- [连接到 Toolbox](#connect-to-toolbox)
- [MCP 客户端](#mcp-client)
- [Toolbox SDK:与你的应用程序集成](#toolbox-sdks-integrate-with-your-application)
- [其他功能](#additional-features)
- [版本管理](#versioning)
- [贡献](#contributing)
- [社区](#community)
---
## Why MCP Toolbox?
## 为何选择 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.
- **开箱即用的数据库访问:** 预构建的通用工具,可让你直接从 IDE 或 CLI 即时探索数据(例如 `list_tables``execute_sql`)。
- **自定义工具框架:** 使用你预定义的逻辑构建可用于生产环境的工具,并通过受限访问(Restricted Access)、结构化查询(Structured Queries)和语义搜索(Semantic Search)确保安全。
- **简化开发:** 用不到 10 行代码即可将工具集成到 Agent Development KitADK)、LangChainLlamaIndex 或自定义智能体中。
- **更佳性能:** 开箱即用支持连接池、集成身份验证(IAM)和端到端可观测性(OpenTelemetry)。
- **增强安全性**:集成身份验证,更安全地访问你的数据。
- **端到端可观测性**:开箱即用的指标与追踪,内置 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.
告别频繁切换上下文,让你的 AI 助手成为真正的协作开发者。通过 MCP Toolbox 将 IDE 连接到数据库,你可以用自然语言查询数据、自动化 schema 发现与管理,并生成具备数据库感知能力的代码。
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.
你可以在任何兼容 MCP 的 IDE 或客户端(例如 Gemini CLIGoogle AntigravityClaude CodeCodex 等)中,通过配置 MCP 服务器来使用 Toolbox。
**Prebuilt tools are also conveniently available via the [Google Antigravity MCP Store](https://antigravity.google/docs/mcp) with a simple click-to-install experience.**
**预构建工具也可通过 [Google Antigravity MCP Store](https://antigravity.google/docs/mcp) 一键安装,使用更便捷。**
1. Add the following to your client's MCP configuration file (usually `mcp.json` or `claude_desktop_config.json`):
1. 将以下内容添加到你的客户端 MCP 配置文件(通常为 `mcp.json` `claude_desktop_config.json`):
```json
{
@@ -93,40 +99,38 @@ You can use the Toolbox in any MCP-compatible IDE or client (e.g., Gemini CLI, G
}
```
2. Set the appropriate environment variables to connect, see the [Prebuilt Tools Reference](https://mcp-toolbox.dev/documentation/configuration/prebuilt-configs/).
2. 设置相应的环境变量以完成连接,请参阅[预构建工具参考](https://mcp-toolbox.dev/documentation/configuration/prebuilt-configs/).
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).
当你使用 `--prebuilt=<database>` 标志运行 Toolbox 时,即可即时获得与该数据库交互的标准工具。你也可以使用 `--prebuilt=<database>/<toolset>` 语法指定特定工具集(例如 `--prebuilt=postgres/data` 仅加载 SQL 工具)。
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](https://mcp-toolbox.dev/integrations/mariadb/source/), SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, Trino, and more.
当前支持的数据库包括:
- **Google Cloud** AlloyDBBigQueryCloud SQLPostgreSQLMySQLSQL Server)、SpannerFirestoreKnowledge Catalog(原 Dataplex)。
- **其他数据库:** PostgreSQLMySQL[MariaDB](https://mcp-toolbox.dev/integrations/mariadb/source/), SQL ServerOracleMongoDBRedisElasticsearchCockroachDBClickHouseCouchbaseNeo4jSnowflakeTrino 等。
For a full list of available tools and their capabilities across all supported databases, see the [Prebuilt Tools Reference](https://mcp-toolbox.dev/documentation/configuration/prebuilt-configs/).
有关所有受支持数据库的可用工具及其能力的完整列表,请参阅[预构建工具参考](https://mcp-toolbox.dev/documentation/configuration/prebuilt-configs/).
*See the [Install & Run the Toolbox server](#install--run-the-toolbox-server) section for different execution methods like Docker or binaries.*
*有关 Docker 或二进制文件等不同运行方式,请参见[安装并运行 Toolbox 服务器](#install--run-the-toolbox-server)一节。*
> [!TIP]
> For users looking for a managed solution, [Google Cloud MCP Servers](https://cloud.google.com/blog/products/databases/managed-mcp-servers-for-google-cloud-databases)
> provide a managed MCP experience with prebuilt tools; you can [learn more about the differences here](https://mcp-toolbox.dev/dev/reference/faq/).
> 如需托管方案,[Google Cloud MCP Servers](https://cloud.google.com/blog/products/databases/managed-mcp-servers-for-google-cloud-databases)
> 提供带有预构建工具的托管 MCP 体验;你可以[在此了解两者差异](https://mcp-toolbox.dev/dev/reference/faq/).
---
## 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.
Toolbox 也可用作定制化工具的框架。
配置 Toolbox 的主要方式是通过 `tools.yaml` 文件。如果你有多个文件,可以使用 `--config
tools.yaml` 标志指定 Toolbox 加载哪一个。
You can find more detailed reference documentation to all resource types in the
你可以在
[Resources](https://mcp-toolbox.dev/documentation/configuration/).
中找到所有资源类型的更详细参考文档。
### 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.
`tools.yaml` 中的 `sources` 部分定义了 Toolbox 应能访问哪些数据源。大多数工具至少需要一个可执行的数据源。
```yaml
kind: source
@@ -139,13 +143,12 @@ user: toolbox_user
password: my-password
```
For more details on configuring different types of sources, see the
有关配置不同类型数据源的更多详情,请参阅
[Sources](https://mcp-toolbox.dev/documentation/configuration/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.
`tools.yaml` 中的 `tools` 部分定义了智能体可执行的操作:工具类型、影响的数据源、使用的参数等。
```yaml
kind: tool
@@ -160,14 +163,13 @@ parameters:
statement: SELECT * FROM hotels WHERE name ILIKE '%' || $1 || '%';
```
For more details on configuring different types of tools, see the
有关如何配置不同类型工具的更多详情,请参阅
[Tools](https://mcp-toolbox.dev/documentation/configuration/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.
你的 `tools.yaml` 中的 `toolsets` 部分允许你定义希望一起加载的工具组。
这对于按智能体(agent)或应用定义不同分组会很有用。
```yaml
kind: toolset
@@ -185,8 +187,8 @@ tools:
### Prompts
The `prompts` section of a `tools.yaml` defines prompts that can be used for
interactions with LLMs.
`tools.yaml` 中的 `prompts` 部分定义了可用于
与 LLM 交互的提示词(prompts)。
```yaml
kind: prompt
@@ -201,43 +203,43 @@ arguments:
description: "The code to review"
```
For more details on configuring prompts, see the
有关如何配置提示词的更多详情,请参阅
[Prompts](https://mcp-toolbox.dev/documentation/configuration/prompts/).
---
## Install & Run the Toolbox server
## 安装并运行 Toolbox 服务器
You can run Toolbox directly with a [configuration file](#quick-start-custom-tools):
你可以使用[配置文件](#quick-start-custom-tools)直接运行 Toolbox
```sh
npx @toolbox-sdk/server --config tools.yaml
```
This runs the latest version of the Toolbox server with your configuration file.
这会使用你的配置文件运行最新版本的 Toolbox 服务器。
> [!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--run-the-toolbox-server).
> 此方法优先考虑便利性,而非性能。
> 如需更标准、更可靠的安装方式,请使用二进制文件
> 或容器镜像,详见[安装并运行 Toolbox 服务器](#install--run-the-toolbox-server)
### Install Toolbox
### 安装 Toolbox
For the latest version, check the [releases page][releases] and use the
following instructions for your OS and CPU architecture.
要获取最新版本,请查看 [releases 页面][releases],并按照
适用于你的操作系统和 CPU 架构的以下说明操作。
[releases]: https://github.com/googleapis/mcp-toolbox/releases
<details open>
<summary>Binary</summary>
To install Toolbox as a binary:
将 Toolbox 安装为二进制文件:
<!-- {x-release-please-start-version} -->
> <details>
> <summary>Linux (AMD64)</summary>
>
> To install Toolbox as a binary on Linux (AMD64):
> 在 Linux (AMD64) 上将 Toolbox 安装为二进制文件:
>
> ```sh
> # see releases page for other versions
@@ -250,7 +252,7 @@ To install Toolbox as a binary:
> <details>
> <summary>macOS (Apple Silicon)</summary>
>
> To install Toolbox as a binary on macOS (Apple Silicon):
> macOS (Apple Silicon) 上将 Toolbox 安装为二进制文件:
>
> ```sh
> # see releases page for other versions
@@ -263,7 +265,7 @@ To install Toolbox as a binary:
> <details>
> <summary>macOS (Intel)</summary>
>
> To install Toolbox as a binary on macOS (Intel):
> 在 macOS (Intel) 上将 Toolbox 安装为二进制文件:
>
> ```sh
> # see releases page for other versions
@@ -276,7 +278,7 @@ To install Toolbox as a binary:
> <details>
> <summary>Windows (Command Prompt)</summary>
>
> To install Toolbox as a binary on Windows (Command Prompt):
> Windows (Command Prompt) 上将 Toolbox 安装为二进制文件:
>
> ```cmd
> :: see releases page for other versions
@@ -288,7 +290,7 @@ To install Toolbox as a binary:
> <details>
> <summary>Windows (PowerShell)</summary>
>
> To install Toolbox as a binary on Windows (PowerShell):
> 在 Windows (PowerShell) 上将 Toolbox 安装为二进制文件:
>
> ```powershell
> # see releases page for other versions
@@ -300,7 +302,7 @@ To install Toolbox as a binary:
> <details>
> <summary>Windows ARM64 (Command Prompt)</summary>
>
> To install Toolbox as a binary on Windows ARM64 (Command Prompt):
> Windows ARM64 (Command Prompt) 上将 Toolbox 安装为二进制文件:
>
> ```cmd
> :: see releases page for other versions
@@ -312,7 +314,7 @@ To install Toolbox as a binary:
> <details>
> <summary>Windows ARM64 (PowerShell)</summary>
>
> To install Toolbox as a binary on Windows ARM64 (PowerShell):
> Windows ARM64 (PowerShell) 上将 Toolbox 安装为二进制文件:
>
> ```powershell
> # see releases page for other versions
@@ -325,7 +327,7 @@ To install Toolbox as a binary:
<details>
<summary>Container image</summary>
You can also install Toolbox as a container:
你也可以将 Toolbox 安装为容器:
```sh
# see releases page for other versions
@@ -338,7 +340,7 @@ docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
<details>
<summary>Homebrew</summary>
To install Toolbox using Homebrew on macOS or Linux:
在 macOS 或 Linux 上使用 Homebrew 安装 Toolbox
```sh
brew install mcp-toolbox
@@ -349,8 +351,8 @@ brew install mcp-toolbox
<details>
<summary>Compile from source</summary>
To install from source, ensure you have the latest version of
[Go installed](https://go.dev/doc/install), and then run the following command:
要从源码安装,请确保已安装最新版本的
[Go](https://go.dev/doc/install),,然后运行以下命令:
```sh
go install github.com/googleapis/mcp-toolbox@v1.6.0
@@ -360,7 +362,7 @@ go install github.com/googleapis/mcp-toolbox@v1.6.0
</details>
<details>
<summary>Gemini CLI</summary>
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.
查看 [Gemini CLI extensions](https://geminicli.com/extensions/),可将针对 AlloyDBBigQuery Cloud SQL 等特定数据库的预构建工具直接安装到 Gemini CLI 中。
```sh
# Install Gemini CLI
@@ -371,7 +373,7 @@ gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-pos
gemini
```
Interact with your custom tools using natural language through the Gemini CLI.
通过 Gemini CLI 使用自然语言与你的自定义工具交互。
```sh
# Install the extension
@@ -380,23 +382,23 @@ gemini extensions install https://github.com/gemini-cli-extensions/mcp-toolbox
</details>
### Run Toolbox
### 运行 Toolbox
[Configure](#quick-start-custom-tools) a `tools.yaml` to define your tools, and then
execute `toolbox` to start the server:
[配置](#quick-start-custom-tools)一个 `tools.yaml` 来定义你的工具,然后
执行 `toolbox` 以启动服务器:
<details open>
<summary>Binary</summary>
To run Toolbox from binary:
从二进制文件运行 Toolbox
```sh
./toolbox --config "tools.yaml"
```
> ⓘ Note
> Toolbox enables dynamic reloading by default. To disable, use the
> `--disable-reload` flag.
> Toolbox 默认启用动态重载。要禁用此功能,请使用
> `--disable-reload` 标志。
</details>
@@ -404,7 +406,7 @@ To run Toolbox from binary:
<summary>Container image</summary>
To run the server after pulling the [container image](#install-toolbox):
拉取[容器镜像](#install-toolbox)后运行服务器:
```sh
export VERSION=0.24.0 # Use the version you pulled
@@ -415,8 +417,8 @@ us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION \
```
> ⓘ Note
> The `-v` flag mounts your local `tools.yaml` into the container, and `-p` maps
> the container's port `5000` to your host's port `5000`.
> `-v` 标志会将你本地的 `tools.yaml` 挂载到容器中,`-p` 会将
> 容器的端口 `5000` 映射到主机的端口 `5000`
</details>
@@ -424,18 +426,18 @@ us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION \
<summary>Source</summary>
To run the server directly from source, navigate to the project root directory
and run:
要直接从源码运行服务器,请进入项目根目录
并运行:
```sh
go 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](./DEVELOPER.md#building-the-binary).
> 此命令从源码运行项目,更适合开发与
> 测试。它**不会**将二进制文件编译到你的 `$GOPATH` 中。如果你希望
> 改为编译二进制文件,请参阅[开发者
> 文档](./DEVELOPER.md#building-the-binary)
</details>
@@ -443,9 +445,9 @@ go run .
<summary>Homebrew</summary>
If you installed Toolbox using [Homebrew](https://brew.sh/), the `toolbox`
binary is available in your system path. You can start the server with the same
command:
如果你使用 [Homebrew](https://brew.sh/), 安装了 Toolbox`toolbox`
二进制文件已在系统路径中可用。你可以使用相同的
命令启动服务器:
```sh
toolbox --config "tools.yaml"
@@ -456,7 +458,7 @@ toolbox --config "tools.yaml"
<details>
<summary>NPM</summary>
To run Toolbox directly without manually downloading the binary (requires Node.js):
无需手动下载二进制文件即可直接运行 Toolbox(需要 Node.js):
```sh
npx @toolbox-sdk/server --config tools.yaml
```
@@ -464,7 +466,7 @@ npx @toolbox-sdk/server --config tools.yaml
</details>
<details>
<summary>Gemini CLI</summary>
After installing a [Gemini CLI extensions](https://geminicli.com/extensions/), the prebuilt tools will be available during use.
安装 [Gemini CLI extensions](https://geminicli.com/extensions/), 后,预构建工具将在使用时可用。
```sh
# Run Gemini CLI
@@ -479,23 +481,21 @@ gemini
</details>
You can use `toolbox help` for a full list of flags! To stop the server, send a
terminate signal (`ctrl+c` on most platforms).
你可以使用 `toolbox help` 查看完整的标志列表!要停止服务器,请发送
终止信号(在大多数平台上为 `ctrl+c`)。
For more detailed documentation on deploying to different environments, check
out the resources in the [Deploy Toolbox
section](https://mcp-toolbox.dev/documentation/deploy-to/)
如需了解在不同环境中部署的更多详细文档,请查阅 [Deploy Toolbox
章节](https://mcp-toolbox.dev/documentation/deploy-to/) 中的资源。
---
## Connect to Toolbox
## 连接到 Toolbox
Once your Toolbox server is up and running, you can load tools into your MCP-compatible client or
application.
Toolbox 服务器启动并运行后,你可以将工具加载到兼容 MCPModel Context Protocol)的客户端或应用中。
### MCP Client
### MCP 客户端
Add the following configuration to your MCP client configuration:
将以下配置添加到你的 MCP 客户端配置中:
```json
{
@@ -508,12 +508,12 @@ 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}".
如需连接到特定 toolset,请将 url 替换为 "http://127.0.0.1:5000/mcp/{toolset_name}"
### Toolbox SDKs: Integrate with your Application
### Toolbox SDK:与应用集成
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:
Toolbox 客户端 SDK 提供了易于使用的构建模块和高级功能,用于将自定义应用连接到 MCP Toolbox 服务器。以下是适用于各种框架的客户端 SDK 列表:
<details open>
<summary>Python (<a href="https://github.com/googleapis/mcp-toolbox-sdk-python">Github</a>)</summary>
@@ -523,13 +523,13 @@ Toolbox Client SDKs provide the easy-to-use building blocks and advanced feature
<details open>
<summary>Core</summary>
1. Install [Toolbox Core SDK][toolbox-core]:
1. 安装 [Toolbox Core SDK][toolbox-core]
```bash
pip install toolbox-core
```
1. Load tools:
1. 加载工具:
```python
from toolbox_core import ToolboxClient
@@ -541,8 +541,8 @@ Toolbox Client SDKs provide the easy-to-use building blocks and advanced feature
tools = await client.load_toolset("toolset_name")
```
For more detailed instructions on using the Toolbox Core SDK, see the
[project's README][toolbox-core-readme].
有关 Toolbox Core SDK 的更多详细使用说明,请参阅
[项目 README][toolbox-core-readme]
[toolbox-core]: https://pypi.org/project/toolbox-core/
[toolbox-core-readme]: https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-core/README.md
@@ -551,13 +551,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>LangChain / LangGraph</summary>
1. Install [Toolbox LangChain SDK][toolbox-langchain]:
1. 安装 [Toolbox LangChain SDK][toolbox-langchain]
```bash
pip install toolbox-langchain
```
1. Load tools:
1. 加载工具:
```python
from toolbox_langchain import ToolboxClient
@@ -569,8 +569,8 @@ For more detailed instructions on using the Toolbox Core SDK, see the
tools = client.load_toolset()
```
For more detailed instructions on using the Toolbox LangChain SDK, see the
[project's README][toolbox-langchain-readme].
有关 Toolbox LangChain SDK 的更多详细使用说明,请参阅
[项目 README][toolbox-langchain-readme]
[toolbox-langchain]: https://pypi.org/project/toolbox-langchain/
[toolbox-langchain-readme]: https://github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-langchain/README.md
@@ -579,13 +579,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>LlamaIndex</summary>
1. Install [Toolbox Llamaindex SDK][toolbox-llamaindex]:
1. 安装 [Toolbox Llamaindex SDK][toolbox-llamaindex]
```bash
pip install toolbox-llamaindex
```
1. Load tools:
1. 加载工具:
```python
from toolbox_llamaindex import ToolboxClient
@@ -597,8 +597,8 @@ For more detailed instructions on using the Toolbox Core SDK, see the
tools = client.load_toolset()
```
For more detailed instructions on using the Toolbox Llamaindex SDK, see the
[project's README][toolbox-llamaindex-readme].
有关 Toolbox Llamaindex SDK 的更多详细使用说明,请参阅
[项目 README][toolbox-llamaindex-readme]
[toolbox-llamaindex]: https://pypi.org/project/toolbox-llamaindex/
[toolbox-llamaindex-readme]: https://github.com/googleapis/genai-toolbox-llamaindex-python/blob/main/README.md
@@ -614,13 +614,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details open>
<summary>Core</summary>
1. Install [Toolbox Core SDK][toolbox-core-js]:
1. 安装 [Toolbox Core SDK][toolbox-core-js]
```bash
npm install @toolbox-sdk/core
```
1. Load tools:
1. 加载工具:
```javascript
import { ToolboxClient } from '@toolbox-sdk/core';
@@ -633,8 +633,8 @@ For more detailed instructions on using the Toolbox Core SDK, see the
const tools = await client.loadToolset('toolsetName');
```
For more detailed instructions on using the Toolbox Core SDK, see the
[project's README][toolbox-core-js-readme].
有关 Toolbox Core SDK 的更多详细使用说明,请参阅
[项目 README][toolbox-core-js-readme]
[toolbox-core-js]: https://www.npmjs.com/package/@toolbox-sdk/core
[toolbox-core-js-readme]: https://github.com/googleapis/mcp-toolbox-sdk-js/blob/main/packages/toolbox-core/README.md
@@ -643,13 +643,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>LangChain / LangGraph</summary>
1. Install [Toolbox Core SDK][toolbox-core-js]:
1. 安装 [Toolbox Core SDK][toolbox-core-js]
```bash
npm install @toolbox-sdk/core
```
2. Load tools:
2. 加载工具:
```javascript
import { ToolboxClient } from '@toolbox-sdk/core';
@@ -676,13 +676,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>Genkit</summary>
1. Install [Toolbox Core SDK][toolbox-core-js]:
1. 安装 [Toolbox Core SDK][toolbox-core-js]
```bash
npm install @toolbox-sdk/core
```
2. Load tools:
2. 加载工具:
```javascript
import { ToolboxClient } from '@toolbox-sdk/core';
@@ -720,13 +720,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>ADK</summary>
1. Install [Toolbox ADK SDK][toolbox-adk-js]:
1. 安装 [Toolbox ADK SDK][toolbox-adk-js]
```bash
npm install @toolbox-sdk/adk
```
2. Load tools:
2. 加载工具:
```javascript
import { ToolboxClient } from '@toolbox-sdk/adk';
@@ -739,8 +739,8 @@ For more detailed instructions on using the Toolbox Core SDK, see the
const tools = await client.loadToolset('toolsetName');
```
For more detailed instructions on using the Toolbox ADK SDK, see the
[project's README][toolbox-adk-js-readme].
有关 Toolbox ADK SDK 的更多详细使用说明,请参阅
[项目 README][toolbox-adk-js-readme]
[toolbox-adk-js]: https://www.npmjs.com/package/@toolbox-sdk/adk
[toolbox-adk-js-readme]:
@@ -757,13 +757,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>Core</summary>
1. Install [Toolbox Go SDK][toolbox-go]:
1. 安装 [Toolbox Go SDK][toolbox-go]
```bash
go get github.com/googleapis/mcp-toolbox-sdk-go
```
2. Load tools:
2. 加载工具:
```go
package main
@@ -786,8 +786,8 @@ For more detailed instructions on using the Toolbox Core SDK, see the
}
```
For more detailed instructions on using the Toolbox Go SDK, see the
[project's README][toolbox-core-go-readme].
有关 Toolbox Go SDK 更详细的使用说明,请参阅
[项目的 README][toolbox-core-go-readme]
[toolbox-go]: https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/core
[toolbox-core-go-readme]: https://github.com/googleapis/mcp-toolbox-sdk-go/blob/main/core/README.md
@@ -796,13 +796,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>LangChain Go</summary>
1. Install [Toolbox Go SDK][toolbox-go]:
1. 安装 [Toolbox Go SDK][toolbox-go]
```bash
go get github.com/googleapis/mcp-toolbox-sdk-go
```
2. Load tools:
2. 加载工具:
```go
package main
@@ -849,13 +849,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>Genkit</summary>
1. Install [Toolbox Go SDK][toolbox-go]:
1. 安装 [Toolbox Go SDK][toolbox-go]
```bash
go get github.com/googleapis/mcp-toolbox-sdk-go
```
2. Load tools:
2. 加载工具:
```go
package main
@@ -894,13 +894,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>Go GenAI</summary>
1. Install [Toolbox Go SDK][toolbox-go]:
1. 安装 [Toolbox Go SDK][toolbox-go]
```bash
go get github.com/googleapis/mcp-toolbox-sdk-go
```
2. Load tools:
2. 加载工具:
```go
package main
@@ -947,13 +947,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details>
<summary>OpenAI Go</summary>
1. Install [Toolbox Go SDK][toolbox-go]:
1. 安装 [Toolbox Go SDK][toolbox-go]
```bash
go get github.com/googleapis/mcp-toolbox-sdk-go
```
2. Load tools:
2. 加载工具:
```go
package main
@@ -999,13 +999,13 @@ For more detailed instructions on using the Toolbox Core SDK, see the
<details open>
<summary>ADK Go</summary>
1. Install [Toolbox Go SDK][toolbox-go]:
1. 安装 [Toolbox Go SDK][toolbox-go]
```bash
go get github.com/googleapis/mcp-toolbox-sdk-go
```
1. Load tools:
1. 加载工具:
```go
package main
@@ -1033,8 +1033,8 @@ For more detailed instructions on using the Toolbox Core SDK, see the
}
```
For more detailed instructions on using the Toolbox Go SDK, see the
[project's README][toolbox-core-go-readme].
有关 Toolbox Go SDK 更详细的使用说明,请参阅
[项目的 README][toolbox-core-go-readme]
</details>
@@ -1044,27 +1044,27 @@ For more detailed instructions on using the Toolbox Core SDK, see the
---
## Additional Features
## 其他功能
### Test tools with the Toolbox UI
### 使用 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](https://mcp-toolbox.dev/documentation/configuration/toolbox-ui/).
要启动 Toolbox 的交互式 UI,请使用 `--ui` 标志。这使你能够测试
工具与 toolset,并支持授权参数等功能。要了解更多信息,
请访问 [Toolbox UI](https://mcp-toolbox.dev/documentation/configuration/toolbox-ui/).
```sh
./toolbox --ui
```
### Telemetry
### 遥测(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](https://mcp-toolbox.dev/documentation/monitoring/export_telemetry/) for details.
Toolbox 通过 OpenTelemetry 发出追踪(trace)和指标(metric)。使用 `--telemetry-otlp=<endpoint>`
可导出到任何兼容 OTLP 的后端,例如 Google Cloud MonitoringAgnost AI
其他服务。详情请参阅[遥测文档](https://mcp-toolbox.dev/documentation/monitoring/export_telemetry/)
### Generate Agent Skills
### 生成 Agent Skill
The `skills-generate` command allows you to convert a **toolset** into an **Agent Skill** compatible with the [Agent Skill specification](https://agentskills.io/specification). This is useful for distributing tools as portable skill packages.
`skills-generate` 命令允许你将 **toolset** 转换为符合 [Agent Skill 规范](https://agentskills.io/specification). 的 **Agent Skill**。这对于将工具以可移植的 skill 包形式分发非常有用。
```bash
toolbox --config tools.yaml skills-generate \
@@ -1073,40 +1073,40 @@ toolbox --config tools.yaml skills-generate \
--description "A skill containing multiple tools"
```
Once generated, you can install the skill into the Gemini CLI:
生成后,你可以将该 skill 安装到 Gemini CLI
```bash
gemini skills install ./skills/my-skill
```
For more details, see the [Generate Agent Skills guide](https://mcp-toolbox.dev/documentation/configuration/skills/).
更多详情,请参阅[生成 Agent Skill 指南](https://mcp-toolbox.dev/documentation/configuration/skills/).
---
## Versioning
## 版本控制
MCP Toolbox for Databases follows [Semantic Versioning](https://semver.org/).
MCP Toolbox for Databases 遵循[语义化版本(Semantic Versioning](https://semver.org/).
The Public API includes the Toolbox Server (CLI, configuration manifests, and pre-built toolsets) and the Client SDKs.
公共 API 包括 Toolbox ServerCLI、配置清单和预构建 toolset)以及 Client SDK
- **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.
- **主版本(Major versions**:当出现破坏性变更时递增,例如不兼容的 CLI 或清单变更。
- **次版本(Minor versions**:在新增功能时递增,包括对预构建 toolset beta 功能的修改。
- **补丁版本(Patch versions**:在向后兼容的错误修复时递增。
For more details, see our [Full Versioning Policy](https://mcp-toolbox.dev/reference/versioning/).
更多详情,请参阅我们的[完整版本控制政策](https://mcp-toolbox.dev/reference/versioning/).
---
## Contributing
## 贡献
Contributions are welcome. Please, see the [CONTRIBUTING](CONTRIBUTING.md) guide to get started.
欢迎贡献。请参阅 [CONTRIBUTING](CONTRIBUTING.md) 指南以开始参与。
For technical details on setting up a environment for developing on Toolbox itself, see the [DEVELOPER](DEVELOPER.md) guide.
有关搭建 Toolbox 本身开发环境的技术细节,请参阅 [DEVELOPER](DEVELOPER.md) 指南。
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](CODE_OF_CONDUCT.md) for more information.
请注意,本项目发布时附带贡献者行为准则(Contributor Code of Conduct)。参与本项目即表示您同意遵守其条款。更多信息请参阅 [贡献者行为准则](CODE_OF_CONDUCT.md)。
---
## Community
Join our [Discord community](https://discord.gg/GQrFB3Ec3W) to connect with our developers!
加入我们的 [Discord 社区](https://discord.gg/GQrFB3Ec3W),与我们的开发者建立联系!