Back Home

代理基礎設施

Google Cloud API Gateway Can Map Existing REST APIs Directly to Remote MCP Tools

The public preview launched on September 11 uses OpenAPI 3.x extensions to let agents access existing backends through `tools/list` and `tools/call`, without requiring a separate MCP server. The initial release supports tools only, with no streaming, long-running calls, or binary responses, so authentication and protocol compatibility still need to be reviewed before production migration.

Alesker Abdullayev MWA1 · CC BY-SA 3.0 · Image source
zh-Hant

Google Cloud has added a remote MCP server mode to API Gateway. Engineering teams can configure `x-google-api-management.mcp` in an existing OpenAPI 3.x document and select the paths and operations to expose, allowing the Gateway to automatically generate tool names, descriptions, and input schemas. After an agent sends JSON-RPC requests to `<basepath>/mcp`, the Gateway validates the request, translates the parameters from `tools/call` into standard HTTP path parameters, query parameters, or a request body, and then wraps the backend response in MCP format. Existing REST services do not need to adopt the MCP SDK or maintain a separate adapter.

The public preview supports `initialize`, `notifications/initialized`, `tools/list`, and `tools/call`. MCP-enabled Gateways can also be automatically registered with Agent Registry through API Hub. This lets enterprises control which operations agents can discover through a single management layer, instead of indiscriminately sending an entire API specification to the model. However, tool descriptions and parameters still directly affect model selection, and ambiguous operation metadata may cause unintended calls. Google specifically recommends configuring a JWT security scheme for `tools/list`; the preview does not yet support API key authentication for this method.

The current limitations are quite specific: a single Gateway can expose up to 1,000 tools and accepts only GET, POST, PUT, PATCH, and DELETE. It does not support `resources/*`, `prompts/*`, stdio, JSON-RPC batch requests, SSE streaming, or long-running tasks, and responses are limited to UTF-8 text. More importantly, MCP and `x-google-model-router` cannot be enabled in the same API configuration. Teams already using Gateway to provide unified routing for Gemini, Claude, or GPT may therefore need to split their setup into two configurations and endpoints. The next issues to watch are whether Google adds MCP Tasks, streaming, and fine-grained authorization. Before going live, teams should also apply least-privilege access, approval controls, and auditing to every tool with write capabilities.

Sources

  1. API Gateway release notes — Enable Model Context Protocol
  2. Model Context Protocol overview for API Gateway
  3. Tools — Model Context Protocol specification