宣布 Apigee hybrid 支持 MCP:可在自有集群中运行的智能体工具
原题Announcing MCP support in Apigee hybrid: agentic tools that run in your own cluster
推荐理由企业平台团队可判断自有集群 MCP 数据面怎样继承 API 治理,在数据驻留、工具开放与运维成本之间做选择。
读前速览
Apigee hybrid 1.17.0 引入了对 Model Context Protocol 的支持,使 AI 智能体能够从 Kubernetes 集群中直接发现和调用 API,而不会将数据暴露于公有云。
本地化数据处理
MCP 数据面完全运行在用户的 Kubernetes 集群内部,这意味着所有 API 请求流量都是本地处理的。这消除了数据需要通过公共互联网或经过谷歌云基础设施的必要,从而大幅增强了安全性和对数据驻留要求的合规性。
与现有 API 的无缝集成
该功能允许直接将现有的 OpenAPI 3.0.x 规范转换为 MCP 工具。这意味着开发人员无需编写自定义的 MCP 服务器代码或管理单独的服务器实例;现有 API 基础设施可以立即用于智能体交互。
综合治理和监控
该集成继承了 Apigee 的全部治理功能套件,包括 OAuth 2.0 认证、API 密钥验证,以及每种工具的配额执行。此外,流量在 Apigee 的 API 洞察仪表板中是完全可见的,可以进行详细的监控和分析。
完整摘要
最新的 Apigee hybrid 版本使部署 MCP 数据面成为可能,这些数据面可位于用户自己的 Kubernetes 集群内,确保所有 API 请求流量保持本地化和安全。此功能能够基于现有的 OpenAPI 规范创建可由 AI 访问的工具,并将所有治理和监控功能完全集成到 Apigee 平台中。
目录 · 6 节
去年 12 月,我们宣布推出 Apigee 中 MCP 支持的预览版:您可以将现有的 API(已完成安全保护、治理和编目)转化为 AI 智能体能够发现和调用的工具,无需编写代码,也无需自行搭建 MCP 服务器。客户的反响立竿见影,随之而来的第一个问题是:“能不能把它部署在我的运行时实际运行的环境中?”Last December, we announced preview of MCP support in Apigee: the ability to turn the APIs you already have, secured, governed and cataloged into tools that AI agents can discover and call, without writing code or standing up MCP servers of your own. The response from customers was immediate and so was the first question back: “can I have this where my runtime actually lives?”
对于许多 Apigee 客户而言,运行时部署在 Google 管理的基础设施之外并非偶然。它可能位于他们自己的数据中心、托管机房,或另一家公有云中,因为监管机构有此要求,因为核心记录系统就在几排机架之外,或者因为多云环境本就是业务的现实。这些客户问的并不是自己是否想让智能体访问其 API,而是能否在不迁移运行时的情况下实现这一点。For many Apigee customers, the runtime does not live on Google-managed infrastructure by accident. It lives in their own data center, in a colocation facility, or in another public cloud because a regulator requires it, because the systems of record are three racks away, or because a multi-cloud estate is simply the reality of the business. Those customers were not asking whether they wanted agentic access to their APIs. They were asking whether they could get it without moving the runtime.
而现在,他们可以了。随着 Apigee hybrid 1.17.0 于 2026 年 9 月 14 日发布,Apigee hybrid 已支持模型上下文协议(MCP),且 MCP 数据平面可在您自己的 Kubernetes 集群内运行。And now they can. With Apigee hybrid 1.17.0, released on September 14, 2026, Model Context Protocol support is available in Apigee hybrid and the MCP data plane runs inside your own Kubernetes cluster.
同一模型,不同地点The same model, in a different place
概念模型与我们在 Apigee 上推出的版本完全相同,没有任何变化。你使用 OpenAPI 3.0.x 规范描述 API,并据此创建 MCP Discovery Proxy。规范中的每个操作都会成为一个 MCP 工具。智能体通过 JSON-RPC 与端点通信,使用 tools/list 发现可用内容,再通过 tools/call 调用工具;协议处理和转码则由 Apigee 完成。你无需编写 MCP 服务器代码,也无需将 MCP 服务器作为具有独立生命周期的软件单独运行。The conceptual model is the one we shipped on Apigee, unchanged. You describe your API with an OpenAPI 3.0.x specification and create an MCP Discovery Proxy from it. Every operation in that spec becomes an MCP tool. Agents talk to the endpoint over JSON-RPC using tools/list to discover what is available and tools/call to invoke it and Apigee handles the protocol and the transcoding. You do not write MCP server code and you do not operate an MCP server as a separate piece of software with its own lifecycle.
混合部署的变化在于工作发生的位置。在 Apigee 混合部署中,MCP 数据平面运行在您自己的 Kubernetes 集群内。Apigee 控制平面根据您的 OpenAPI 规范生成 MCP 工具配置,您的集群会定期获取该配置,而 MCP 请求流量始终不会离开集群。下图展示了各部署模式下 MCP 数据平面的运行位置。What changes in hybrid is where the work happens. In Apigee hybrid, the MCP data plane runs inside your own Kubernetes cluster. The Apigee control plane generates MCP tool configuration from your OpenAPI Specification, your cluster fetches that configuration periodically and MCP request traffic never leaves the cluster. The diagram below shows where the MCP data plane runs in each deployment model.
值得明确指出该架构的两个特性,因为安全审查团队会询问这两点。Two properties of that architecture are worth stating plainly because they are the ones your security review team will ask about.
MCP 请求流量始终留在您的集群内。Agent 的 tools/call 请求会在您自己的基础设施内完成接收、授权,并代理到您的后端。请求处理期间,不会有任何 MCP 请求或响应越过边界发送到 Google Cloud。MCP request traffic stays inside your cluster. An agent's tools/call request is received, authorized and proxied to your backend entirely within your own infrastructure. No MCP request or response crosses the boundary to Google Cloud at request time.
配置采用拉取而非推送的方式。与 MCP 数据平面并行运行的 sidecar(位于集群内部)会主动获取根据你的规范生成的工具配置。Apigee 控制平面(位于 Google Cloud)绝不会主动向你的集群发起连接,这意味着 MCP 不需要从 Google 到你的网络的任何入站通道。Configuration is pulled, not pushed. A sidecar alongside the MCP data plane (from within your cluster) reaches out to fetch the tool configuration derived from your spec. The Apigee control plane (in Google Cloud) never initiates a connection into your cluster, which means MCP requires no inbound path from Google into your network.
这对多云和本地部署意味着什么What this means for multi-cloud and on-premises
- 智能体端点运行在 API 所在的位置。Apigee hybrid 已支持在你选择的 Kubernetes 平台上托管运行时,MCP 也沿用了这一能力。MCP sidecar 复用现有的 apigee-watcher 身份。无需创建新的 Google 服务账号,也无需授予新的 IAM 角色。每个组织只需授予一次控制平面权限,剩下的工作由你现有的身份来完成。Agentic endpoints run where your APIs already run. Apigee hybrid already lets you host the runtime on the Kubernetes platform of your choice and MCP inherits that. The MCP sidecar reuses the existing
apigee-watcheridentity. There is no new Google service account to create and no new IAM role to grant. One control-plane grant per organization and the identity you already have does the rest. - 数据驻留和数据主权方面的保障同样适用。Apigee hybrid 中的 MCP 面向订阅版和评估版组织开放,也包括启用了数据驻留功能的组织(在组织设置时配置)。在 hybrid 中,配置从您的控制平面所在位置获取,而运行时请求路径则通过架构设计始终留在您的集群内。对于要求“请求不得离开此司法辖区、此设施或此 VPC”的团队,架构本身就能满足这一要求,无需依赖某项设置。Data residency and sovereignty posture carry over. MCP in Apigee hybrid is available for Subscription and Evaluation organizations, including Data Residency–enabled organizations (configured at organization setup). On hybrid, configuration is fetched from your control plane location and the runtime request path stays in your cluster by construction. For teams whose constraint is "the request may not leave this jurisdiction, this facility, or this VPC," that constraint is supported by the architecture rather than by a setting.
- 你已经编写的治理机制同样适用于智能体。MCP 端点是 Apigee 代理,因此会继承该平台的能力:OAuth 2.0 和 OpenID Connect、API 密钥验证,以及 Apigee 内置的策略库。工具级控制则来自你已经在使用的一个概念——API 产品。你可以列出客户端有权使用的具体工具操作,还可以选择为每种工具设置配额,Apigee 会负责强制执行。它还会自动过滤发现结果。客户端调用 tools/list 时,响应中只包含该客户端 API 产品中的工具。如果智能体从未获准查看 delete_account,就无法调用它。The governance you already wrote applies to agents. MCP endpoints are Apigee proxies, so they inherit the platform: OAuth 2.0 and OpenID Connect, API key verification as well as Apigee's built-in policy library. Tool-level control comes from a concept you already use, the API product. You list the specific tool operations a client is entitled to, optionally with a per-tool quota and Apigee enforces it. It also filters discovery automatically. When a client calls
tools/list, the response contains only the tools in that client's API product. An agent cannot calldelete_accountif it was never allowed to see it. - 您的智能体流量会出现在 API 流量所在的位置。已部署的 MCP Discovery Proxy 会自动导入 Apigee API hub,并标记为 MCP API 风格,其操作也会映射到各个独立工具中,形成可搜索的目录,让开发者可以用自然语言查询,而不必再查阅端点电子表格。在 API 洞察中,API 风格和 MCP 工具名称这两个筛选条件可让您从普通 REST 流量中筛选出智能体流量,并在 API 性能、错误分析、延迟和目标性能仪表板中查看单个工具。您可以查看发现与执行的比例,也可以区分代理开销和后端耗时。Your agentic traffic shows up where your API traffic does. Deployed MCP Discovery Proxies are automatically ingested into Apigee API hub, assigned the MCP API style and their operations mapped to individual tools a searchable catalog that developers can query in natural language rather than a spreadsheet of endpoints. In API insights, two filters, API style and MCP tool name let you isolate agentic traffic from ordinary REST traffic and look at a single tool across the API performance, error analysis, latency and target performance dashboards. You can see the ratio of discovery to execution and you can tell proxy overhead apart from backend time.
开启它Turning it on
MCP 是 Apigee hybrid 中的一项可选功能,默认情况下未启用。启用 MCP 需要在已运行 Apigee hybrid 1.17.0 或更高版本的集群上执行 Helm 操作。具体步骤如下。MCP is an optional feature in Apigee hybrid and is not enabled by default. Enabling it is a Helm operation on a cluster already running Apigee hybrid 1.17.0 or later. Steps to do this are as follows.
在 overrides.yaml 中设置顶层键 enableMcpServer: true,然后先升级 apigee-operator chart,再升级 apigee-org chart。顺序很重要。operator chart 负责新 MCP 资源的 schema,顺序错误会导致升级成功,但不会启动任何 MCP Pod。此外,还需要为每个组织执行一次授权,将 apigee-watcher 身份添加到组织的控制平面访问权限中,以便 sidecar 检索配置。默认配置开箱即用且合理:两个 MCP 副本,自动扩缩容至十个。回滚只需将同一字段设为 false,然后升级一次 chart。Set the top-level enableMcpServer: true key in your overrides.yaml, then upgrade the apigee-operator chart first and the apigee-org chart second. The order matters. The operator chart owns the schema for the new MCP resources and upgrading in the wrong order produces a successful upgrade with no MCP pods. There is also a one-time, per-organization grant that adds the apigee-watcher identity to your organization's control plane access, so the sidecar can retrieve configuration. Defaults are sensible out of the box. Two MCP replicas, autoscaling to ten. Rolling back is the same field set to false and a single chart upgrade.
安排这项变更之前,需要提前规划几件事。启用或停用 MCP 会触发运行时 Pod 的分阶段金丝雀发布,因此请在获批的维护时段内执行。此处的公开文档介绍了如何在现有的 Apigee hybrid 集群中启用 MCP。A few things to plan for before you schedule the change. Enabling or disabling MCP triggers a staged canary release of runtime pods, so run it in an approved maintenance window. The public documentation here describes how to enable MCP in an existing Apigee hybrid cluster.
在 Apigee 中观察 MCP 流量Observing MCP Traffic within Apigee
你的 MCP 代理通过单个端点公开。无论调用什么工具,每个代理请求都会到达同一个 /mcp 路径。Apigee 会为每个请求标记所调用工具的名称,因此 API Insights 可以按工具拆分这个端点的数据,并显示代理实际使用了哪些工具、使用频率以及使用时间段。下方截图展示了 API Insights,其中包括对 MCP 代理 (mcp) 的请求,也展示了各个工具(作为 API 代理 mcp-healthcare、mcp-petstore、mcp-statuscode)的响应时间和 TPS。请参阅此处和此处的公开文档,了解如何使用 API Insights 信息中心监控和分析 MCP 流量。Your MCP proxy is exposed as a single endpoint. Every agent request, whatever tool it invokes, arrives at the same /mcp path. Apigee tags each of those requests with the name of the tool that was called, so API insights can break that one endpoint out by tool and show which tools your agents actually used, how often and over what period. The screenshot below shows API insights, including requests to the MCP proxy (mcp) and also see individual tools (as API proxies mcp-healthcare, mcp-petstore, mcp-statuscode) response time and tps. See public documentation on monitoring and analyzing mcp traffic with Apigee API insights here and here on how to use the API insights dashboard.
我们还可以在下方 API Insights 的工具性能标签页中查看工具调用情况。We also have a view of tools being called in the tool performance tab within API insights below.
接下来:端到端追踪智能体的一次调用What's next: tracing an agent's call end to end
一次 MCP 工具调用会经过 AI 客户端、Apigee 和你的后端。如今,这些环节各自为政,日志彼此隔离,因此平台团队真正想问的“时间都花在哪儿了?”始终没有统一的答案。An MCP tool call crosses an AI client, Apigee and your backend. Today each of those is its own island of logs, so the question platform teams actually ask “where did the time go?” has no single answer.
下面的代码片段是 AI 客户端发出的一个 mcp 工具调用请求示例。启用 Apigee 中的 OTEL 分布式追踪后,下面的 curl 请求可实现端到端的请求追踪。The snippet below is an example mcp tools call request from an AI client. The curl request below allows for end to end tracking of the request, when distributed trace is enabled in Apigee with OTEL.
curl -X POST "https://xxx.xxx.xxx.net/mcp" \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{
"jsonrpc": "2.0",
"id": 321,
"method": "tools/call",
"params": {
"name": "createReward",
"arguments": {
"reward": "123"
},
"_meta": {
"traceparent": "00-3ad8012d970b3971cb16cda653a1a370-df3047d1d0830dc0-01"
}
}
}'
同一个调用通过 Google Cloud Trace 的分布式跟踪进行编排后,会在一个全局视图中完整显示所有调用。(假设链中的所有服务(Apigee/非 Apigee)都向同一个 Google Cloud Trace 上报。)The same call as orchestrated by distributed trace in Google CloudTrace shows the calls in its entirety in one global view. (Assumption is all services (Apigee/Non-Apigee) in the chain report to the same Google CloudTrace)
MCP 客户端会将 W3C 跟踪上下文放在 JSON-RPC 的 _meta 字段中,而传统 REST 后端并不知道该如何读取它。Apigee 会提取这些信息,并将其作为普通的 traceparent 和 tracestate 标头转发,因此下游经过埋点的服务无需修改代码即可加入跟踪。由此带来三点好处:一个跟踪 ID 即可贯穿 AI 客户端、Apigee 代理和后端执行过程;后端无需重新编码即可参与跟踪;噪声更少,因为网关可以采用透传模式转发上下文,而不是自行生成基础设施跨度,从而也降低了跟踪数据的采集成本。MCP clients carry W3C trace context inside the JSON-RPC _meta field, which a conventional REST backend has no idea how to read. Apigee extracts it and forwards it as ordinary traceparent and tracestate headers, so instrumented services downstream join the trace without code changes. Three things follow: a single trace ID spanning the AI client, the Apigee proxies and backend execution; backends that participate without recoding and less noise, because the gateway can forward context in passthrough mode rather than emitting infrastructure spans of its own which also trims trace ingestion cost.
整个生态系统正趋向于同一理念。SEP-2028 是 MCP 社区的一项开放提案,旨在为 MCP 服务器标准化将 W3C trace context 从 _meta 转发到标头的行为。The ecosystem is converging on the same idea. SEP-2028, an open proposal in the MCP community, aims to standardize _meta-to-header forwarding of W3C trace context standard behavior for MCP servers.
如今,Apigee 已支持承载 W3C 跟踪上下文的 OpenTelemetry 路径。The OpenTelemetry path that carries W3C trace context is available in Apigee today.
后续步骤Next steps
Apigee hybrid 1.17.0 现已支持 MCP。首先阅读 Apigee 中的 MCP 概览,了解其架构;然后参阅在 Apigee hybrid 中启用 MCP,了解 Helm 操作流程;最后按照 MCP 快速入门,获取第一个能够响应智能体的工具。MCP support is available now in Apigee hybrid 1.17.0. Start with the MCP in Apigee overview for the architecture, Enable MCP in Apigee hybrid for the Helm procedure and the MCP quickstart to get a first tool answering an agent.