Model Context Protocol (MCP)¶
模型上下文协议(MCP)¶
The Model Context Protocol (MCP) is an open standard designed to standardize how Large Language Models (LLMs) like Gemini and Claude communicate with external applications, data sources, and tools. Think of it as a universal connection mechanism that simplifies how LLMs obtain context, execute actions, and interact with various systems.
模型上下文协议(MCP) 是一个开放标准,旨在标准化大语言模型(LLMs)如 Gemini 和 Claude 与外部应用程序、数据源和工具的通信方式。将其视为一种通用连接机制,简化了 LLM 获取上下文、执行操作以及与各种系统交互的方式。
How does MCP work?¶
MCP follows a client-server architecture, defining how data (resources), interactive templates (prompts), and actionable functions (tools) are exposed by an MCP server and consumed by an MCP client (which could be an LLM host application or an AI agent).
MCP 是如何工作的?¶
MCP 遵循客户端-服务器架构,定义了数据(资源)、交互模板(提示)和可操作函数(工具)如何由 MCP 服务器暴露并由 MCP 客户端(可以是 LLM 主机应用程序或 AI 智能体)消费。
MCP Tools in ADK¶
ADK helps you both use and consume MCP tools in your agents, whether you're trying to build a tool to call an MCP service, or exposing an MCP server for other developers or agents to interact with your tools.
ADK 中的 MCP 工具¶
ADK 帮助您在智能体中使用和消费 MCP 工具,无论您是试图构建一个调用 MCP 服务的工具,还是暴露一个 MCP 服务器供其他开发者或智能体与您的工具交互。
Refer to the MCP Tools documentation for code samples and design patterns that help you use ADK together with MCP servers, including:
请参阅 MCP 工具文档 以获取代码示例和设计模式,帮助您将 ADK 与 MCP 服务器一起使用,包括:
- Using Existing MCP Servers within ADK: An ADK agent can act as an MCP client and use tools provided by external MCP servers.
在 ADK 中使用现有的 MCP 服务器:ADK 智能体可以作为 MCP 客户端,使用由外部 MCP 服务器提供的工具。
- Exposing ADK Tools via an MCP Server: How to build an MCP server that wraps ADK tools, making them accessible to any MCP client.
通过 MCP 服务器暴露 ADK 工具:如何构建一个包装 ADK 工具的 MCP 服务器,使其可被任何 MCP 客户端访问。
MCP Toolbox for Databases¶
MCP Toolbox for Databases is an open-source MCP server that securely exposes your backend data sources as a set of pre-built, production-ready tools for Gen AI agents. It functions as a universal abstraction layer, allowing your ADK agent to securely query, analyze, and retrieve information from a wide array of databases with built-in support.
数据库的 MCP 工具箱¶
数据库的 MCP 工具箱 是一个开源的 MCP 服务器,安全地将您的后端数据源暴露为一组预构建的、生产就绪的 Gen AI 智能体工具。它作为一个通用抽象层,允许您的 ADK 智能体在内置支持下安全地查询、分析和从各种数据库检索信息。
The MCP Toolbox server includes a comprehensive library of connectors, ensuring that agents can safely interact with your complex data estate.
MCP 工具箱服务器包含一个全面的连接器库,确保智能体可以安全地与您的复杂数据资产交互。
Supported Data Sources¶
支持的数据源¶
MCP Toolbox provides out-of-the-box toolsets for following databases and data platforms:
MCP 工具箱为以下数据库和数据平台提供开箱即用的工具集:
Google Cloud¶
-
BigQuery (including tools for SQL execution, schema discovery, and AI-powered time series forecasting)
BigQuery(包括 SQL 执行、模式发现和 AI 驱动的时间序列预测工具)
-
AlloyDB (PostgreSQL-compatible, with tools for both standard queries and natural language queries)
AlloyDB(PostgreSQL 兼容,提供标准查询和自然语言查询工具)
-
AlloyDB Admin
-
Spanner (supporting both GoogleSQL and PostgreSQL dialects)
Spanner(支持 GoogleSQL 和 PostgreSQL 方言)
-
Cloud SQL (with dedicated support for Cloud SQL for PostgreSQL, Cloud SQL for MySQL, and Cloud SQL for SQL Server)
Cloud SQL(专门支持 Cloud SQL for PostgreSQL、Cloud SQL for MySQL 和 Cloud SQL for SQL Server)
-
Cloud SQL Admin
-
Firestore
-
Bigtable
-
Dataplex (for data discovery and metadata search)
Dataplex(用于数据发现和元数据搜索)
-
Cloud Monitoring
Relational & SQL Databases¶
关系型和 SQL 数据库¶
-
PostgreSQL (generic)
PostgreSQL(通用)
-
MySQL (generic)
MySQL(通用)
-
Microsoft SQL Server (generic)
Microsoft SQL Server(通用)
-
ClickHouse
-
TiDB
-
OceanBase
-
Firebird
-
SQLite
-
YugabyteDB
NoSQL & Key-Value Stores¶
NoSQL 和键值存储¶
Graph Databases¶
图数据库¶
-
Neo4j (with tools for Cypher queries and schema inspection)
Neo4j(提供 Cypher 查询和模式检查工具)
-
Dgraph
Data Platforms & Federation¶
数据平台和联邦¶
-
Looker (for running Looks, queries, and building dashboards via Looker API)
Looker(用于通过 Looker API 运行 Looks、查询和构建仪表板)
-
Trino (for running federated queries across multiple sources)
Trino(用于跨多个源运行联邦查询)
Other¶
其他¶
-
HTTP
Documentation¶
文档¶
Refer to the MCP Toolbox for Databases documentation on how you can use ADK together with MCP Toolbox for Databases. For getting started with MCP Toolbox for Databases, a blog post Tutorial : MCP Toolbox for Databases - Exposing Big Query Datasets and Codelab MCP Toolbox for Databases:Making BigQuery datasets available to MCP clients are also available.
请参阅 数据库的 MCP 工具箱 文档,了解如何将 ADK 与数据库的 MCP 工具箱一起使用。有关开始使用数据库的 MCP 工具箱,博客文章 教程:数据库的 MCP 工具箱 - 暴露 BigQuery 数据集 和 Codelab 数据库的 MCP 工具箱:使 BigQuery 数据集对 MCP 客户端可用 也可供参考。

ADK Agent and FastMCP server¶
FastMCP handles all the complex MCP protocol details and server management, so you can focus on building great tools. It's designed to be high-level and Pythonic; in most cases, decorating a function is all you need.
ADK 智能体和 FastMCP 服务器¶
FastMCP 处理所有复杂的 MCP 协议细节和服务器管理,因此您可以专注于构建优秀的工具。它设计为高级和 Pythonic 的;在大多数情况下,装饰一个函数就足够了。
Refer to the MCP Tools documentation documentation on how you can use ADK together with FastMCP server running on Cloud Run.
请参阅 MCP 工具文档 文档,了解如何将 ADK 与在 Cloud Run 上运行的 FastMCP 服务器一起使用。
MCP Servers for Google Cloud Genmedia¶
MCP Tools for Genmedia Services is a set of open-source MCP servers that enable you to integrate Google Cloud generative media services—such as Imagen, Veo, Chirp 3 HD voices, and Lyria—into your AI applications.
Google Cloud Genmedia 的 MCP 服务器¶
Genmedia 服务的 MCP 工具 是一组开源 MCP 服务器,使您能够将 Google Cloud 生成式媒体服务(如 Imagen、Veo、Chirp 3 HD 声音和 Lyria)集成到您的 AI 应用程序中。
Agent Development Kit (ADK) and Genkit provide built-in support for these MCP tools, allowing your AI agents to effectively orchestrate generative media workflows. For implementation guidance, refer to the ADK example agent and Genkit example.
智能体开发工具包(ADK)和 Genkit 为这些 MCP 工具提供内置支持,允许您的 AI 智能体有效地编排生成式媒体工作流。有关实现指导,请参阅 ADK 示例智能体和 Genkit 示例。