去年十二月,我们宣布在 Apigee 中预览支持 MCP:这项功能允许您将现有的、已受保护、受治理并编入目录的 API 转化为 AI 智能体可发现并调用的工具,而无需编写代码或自行搭建 MCP 服务器。客户的反响立竿见影,随之而来的第一个问题也是:“我能否在我的运行时实际所在的位置使用此功能?”
对于许多 Apigee 客户而言,其运行时并非偶然地不运行在 Google 管理的基础设施上。它位于客户自己的数据中心、托管设施或其他公共云中,这是因为监管机构的要求,因为记录系统就在三排机柜之外,或者因为多云环境本身就是业务的现实。这些客户并非在询问他们是否希望获得对其 API 的智能体访问权限,而是在询问是否可以在不迁移运行时的情况下获得该功能。
现在他们可以了。随着 2026 年 9 月 14 日发布的 Apigee hybrid 1.17.0,Apigee hybrid 中现已支持 Model Context Protocol,且 MCP 数据平面运行在您自己的 Kubernetes 集群内部。
相同的模型,不同的位置
概念模型与我们在 Apigee 上交付的模型保持一致,未作更改。您使用 OpenAPI 3.0.x 规范描述您的 API,并从中创建 MCP Discovery Proxy。该规范中的每个操作都成为一个 MCP 工具。智能体通过 JSON-RPC 与端点通信,使用 tools/list 发现可用内容,并使用 tools/call 进行调用,而 Apigee 负责处理协议和转码。您无需编写 MCP 服务器代码,也无需将 MCP 服务器作为具有自身生命周期的独立软件来运营。
在 hybrid 版本中发生变化的是工作发生的位置。在 Apigee hybrid 中,MCP 数据平面运行在您自己的 Kubernetes 集群内部。Apigee 控制平面从您的 OpenAPI 规范生成 MCP 工具配置,您的集群定期获取该配置,且 MCP 请求流量永远不会离开集群。下图显示了在每个部署模型中 MCP 数据平面的运行位置。
该架构的两个特性值得明确说明,因为它们是您的安全审查团队会询问的问题。
MCP 请求流量保留在您的集群内部。智能体的 tools/call 请求在您的基础设施内部完全接收、授权并代理到您的后端。在任何请求时刻,没有任何 MCP 请求或响应跨越边界到达 Google Cloud。
配置是拉取而非推送的。位于 MCP 数据平面旁边的边车(来自您的集群内部)会向外获取源自您规范的配置。Apigee 控制平面(在 Google Cloud 中)永远不会主动发起进入您集群的连接,这意味着 MCP 不需要从 Google 到您的网络的入站路径。
这对多云和本地部署意味着什么
智能体端点运行在您现有的 API 所在的位置。Apigee hybrid 已允许您在所选的 Kubernetes 平台上托管运行时,MCP 继承了这一特性。MCP 边车重用现有的 apigee-watcher 身份。无需创建新的 Google 服务账号,也无需授予新的 IAM 角色。每个组织只需一个控制平面授权,您已有的身份即可完成其余工作。
数据驻留和主权态势得以延续。Apigee hybrid 中的 MCP 适用于订阅型和评估型组织,包括启用了数据驻留的组织(在组织设置时配置)。在 hybrid 版本中,配置从您的控制平面位置获取,且运行时请求路径因架构设计而保留在您集群内部。对于受限于“请求不得离开此司法管辖区、此设施或此 VPC”的团队而言,该限制由架构支持,而非通过设置实现。
您已有的治理策略同样适用于智能体(Agents)。MCP 端点是 Apigee 代理,因此它们继承了该平台的功能:OAuth 2.0 和 OpenID Connect、API 密钥验证以及 Apigee 内置的策略库。工具级别的控制来自于您已经使用的概念——API 产品(API product)。您可以列出客户端有权访问的具体工具操作,并可选地设置按工具划分的配额,Apigee 会强制执行这些限制。它还会自动过滤发现列表。当客户端调用 tools/list 时,响应中仅包含该客户端 API 产品中定义的工具。如果某个工具从未被允许可见,智能体就无法调用 delete_account。
您的智能体流量出现在您 API 流量所在的地方。已部署的 MCP Discovery Proxies 会自动被摄入到 Apigee API Hub 中,分配为 MCP API 样式,并将其操作映射到可搜索目录中的单个工具,开发者可以用自然语言查询该目录,而不是查阅端点电子表格。在 API Insights(API 洞察)中,通过“API 样式”和“MCP 工具名称”两个过滤器,您可以将智能体流量与普通 REST 流量隔离开来,并在 API 性能、错误分析、延迟和目标性能仪表板上查看单个工具的指标。您可以看到发现与执行的比率,并将代理开销与后端时间区分开来。
开启它
MCP 是 Apigee Hybrid 中的可选功能,默认情况下未启用。启用它是一个 Helm 操作,针对已运行 Apigee Hybrid 1.17.0 或更高版本的集群。具体步骤如下。
在 overrides.yaml 中将顶层 enableMcpServer: true 键设置为 true,然后先升级 apigee-operator chart,再升级 apigee-org chart。顺序很重要。operator chart 拥有新 MCP 资源的模式定义,如果以错误的顺序升级,虽然升级过程显示成功,但不会产生 MCP Pod。此外,还需要为每个组织进行一次性的授权,将 apigee-watcher 身份添加到您组织的控制平面访问权限中,以便边车(sidecar)能够检索配置。默认值开箱即用即合理:两个 MCP 副本,自动扩展至十个。回滚只需将该字段设置为 false 并执行一次 chart 升级即可。
在计划变更之前,有几件事需要预先规划。启用或禁用 MCP 会触发运行时 Pod 的分阶段金丝雀发布,因此请在已批准的时间窗口内执行此操作。本文档中的公共文档描述了如何在现有的 Apigee Hybrid 集群中启用 MCP。
在 Apigee 中观察 MCP 流量
您的 MCP 代理暴露为单个端点。每个智能体请求,无论调用哪个工具,都会到达相同的 /mcp 路径。Apigee 为每个请求标记所调用的工具名称,因此 API Insights 可以按工具拆分该单一端点,并显示您的智能体实际使用了哪些工具、使用频率以及时间段。下面的截图展示了 API Insights,包括对 MCP 代理(mcp)的请求,以及各个工具(作为 API 代理 mcp-healthcare、mcp-petstore、mcp-statuscode)的响应时间和 TPS。有关使用 Apigee API Insights 监控和分析 MCP 流量的公共文档,请参阅此处和此处关于如何使用 API Insights 仪表板的说明。
我们还在下面的 API Insights 中的“工具性能”选项卡中展示了被调用的工具的视图。
下一步:端到端追踪智能体的调用
MCP 工具调用跨越了 AI 客户端、Apigee 和您的后端。目前,每一层都是独立的日志孤岛,因此平台团队真正提出的问题——“时间都去哪儿了?”——没有单一的答案。
下面的代码片段是一个来自 AI 客户端的 MCP 工具调用请求示例。当 Apigee 中启用了带有 OTEL 的分布式追踪时,下面的 curl 请求允许对请求进行端到端追踪。
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"
}
}
}'
Shell
通过 Google CloudTrace 中的分布式跟踪编排的相同调用,可以在一个全局视图中完整显示这些调用。(假设链中的所有服务(Apigee/非 Apigee)都报告给同一个 Google CloudTrace)
MCP 客户端在 JSON-RPC _meta 字段中携带 W3C 跟踪上下文,而传统的 REST 后端无法读取该字段。Apigee 提取该上下文并将其作为普通的 traceparent 和 tracestate 标头转发,从而使下游的已插桩服务无需更改代码即可加入跟踪。由此带来三个结果:一个跨越 AI 客户端、Apigee 代理和后端执行的单一跟踪 ID;参与的后端无需重新编码且噪声更少,因为网关可以以透传模式转发上下文,而不是生成其自身的基础设施跨度,这也降低了跟踪摄取成本。
生态系统正朝着相同的理念收敛。MCP 社区中的开放提案 SEP-2028 旨在标准化 MCP 服务器的 W3C 跟踪上下文 _meta 到标头转发的标准行为。
承载 W3C 跟踪上下文的 OpenTelemetry 路径目前在 Apigee 中可用。
下一步
Apigee hybrid 1.17.0 现已提供 MCP 支持。从 Apigee 中的 MCP 概述开始了解架构,通过在 Apigee hybrid 中启用 MCP 获取 Helm 过程,并通过 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?”
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.
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
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.
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 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.
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
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-watcher identity. 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.
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.
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 call delete_account if it was never allowed to see it.
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 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.
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.
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.
Observing MCP Traffic within Apigee
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.
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
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.
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"
}
}
}'
Shell
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 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.
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.
The OpenTelemetry path that carries W3C trace context is available in Apigee today.
Next steps
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.
首次收录 · 2026-10-15 · 8.4 分