{"slug": "turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway", "title": "Turn your REST APIs into MCP tools with Google Cloud API Gateway", "summary": "Google Cloud API Gateway entered Public Preview with the ability to act as a remote MCP server, letting teams expose existing REST operations as agent-ready MCP tools by annotating their OpenAPI spec with x-google-api-management.mcp and x-google-mcp-tool rather than building and hosting a separate MCP server. API Gateway accepts standard MCP JSON-RPC requests on a single endpoint, transcodes each tools/call into the corresponding REST request, and reuses the existing JWT or API-key authentication, quota, and logging policies, with MCP served on the /mcp base path. By default tools/list is unauthenticated, so Google advises requiring a JWT for production since API keys cannot secure that method.", "body_md": "Most enterprise capability sits behind REST APIs that agents cannot see. To make one callable by an agent today, teams typically stand up and operate a separate MCP server that re-implements the routing, authentication, and quota logic their gateway already handles. The Model Context Protocol (MCP) has become the standard way for agents to discover and invoke tools, and frameworks like the Agent Development Kit (ADK) and Gemini Enterprise speak it natively.\n\n[Google Cloud API Gateway](https://cloud.google.com/api-gateway/docs) now closes that gap. In Public Preview, API Gateway can act as a remote MCP server: annotate the OpenAPI spec you already deploy, deploy it, and your existing REST operations are available as agent-ready MCP tools — with no separate server to build, host, or maintain.\n\nAPI Gateway is the lightweight on-ramp in Google Cloud's gateway lineup. If you have a service on Cloud Run and you want its API secured, managed, and exposed to agents in minutes, this is the fast path. For a full enterprise API and MCP platform — lifecycle management, advanced traffic policies, monetization — use [Apigee](https://cloud.google.com/apigee/docs/api-platform/get-started/ai-capabilities). To govern what your agents call on the way out, including MCP servers like this one, use [Agent Gateway](https://cloud.google.com/gemini-enterprise-agent-platform/govern/gateways/agent-gateway-overview). [Model routing](https://developers.googleblog.com/a-unified-api-for-ai-model-routing/), which gives you one stable endpoint for outbound LLM calls, is the companion capability for the other direction of AI traffic.\n\nAPI Gateway accepts standard MCP JSON-RPC requests on a single endpoint, transcodes each `tools/call` into the corresponding REST request, applies your existing policies, and translates the response back. Because the transcoded request is indistinguishable from a normal REST call, the JWT or API-key authentication, quota, and logging you already configured for that operation keep working unchanged — MCP and REST traffic share exactly one policy path, and a given operation draws on one quota allocation however it is invoked.\n\n`x-google-api-management.mcp`, and customize or skip individual operations with `x-google-mcp-tool`. Each exposed operation needs a backend and a non-empty description.\n\n```\nopenapi: 3.0.4\ninfo:\n  title: Order Service\n  version: 1.0.0\n\nx-google-api-management:\n  mcp: true                 # expose this spec's operations as MCP tools\n  backends:\n    orders-backend:\n      address: https://orders-a1b2c3-uc.a.run.app\n\npaths:\n  /orders/{orderId}:\n    get:\n      operationId: getOrderStatus\n      description: Returns the current status, carrier, and ETA for an order.\n      x-google-backend: orders-backend\n      x-google-mcp-tool:\n        name: get_order_status\n        description: \"Look up the delivery status and ETA of a customer order.\n          Use this when the user asks where an order is or when it will arrive.\"\n      parameters:\n        - name: orderId\n          in: path\n          required: true\n          schema:\n            type: string\n```\n\nA tool's description is the primary signal an LLM uses to decide when to call it, so write *when and why* to use the tool, not just what it returns.\n\n2. **Deploy the gateway.** Deploy the API config as usual. API Gateway generates an MCP-aware configuration and begins serving MCP on the `/mcp` base path, with no extra infrastructure to provision.\n\n3. **Decide who can discover your tools.** By default `tools/list` is unauthenticated, which is convenient for development but publishes your tool names and input schemas to anyone who asks. For production, require a JWT — note that API keys cannot secure this method:\n\n```\nx-google-api-management:\n  mcp:\n    tools-list:\n      security:\n        orderServiceJwt: []   # the object form also enables MCP globally\n```\n\n`tools/call` always enforces whatever authentication the underlying REST operation requires, whether or not you secure discovery.\n\n4. **Connect your agent.** Point any MCP client at the gateway's `/mcp` endpoint. In ADK, that is the toolset plus the credential your gateway already expects:\n\n``` python\nfrom google.adk.agents import Agent\nfrom google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams\n\norder_tools = McpToolset(\n    connection_params=StreamableHTTPConnectionParams(\n        url=\"https://my-gateway-a12bcd345e67f89g0h.uc.gateway.dev/mcp\",\n        headers={\"x-api-key\": API_KEY},\n    )\n)\n\nagent = Agent(\n    model=\"gemini-2.5-flash\",\n    name=\"order_support_agent\",\n    instruction=\"Help the user check on their orders.\",\n    tools=[order_tools],\n)\n```\n\nThe gateway maps the tool's arguments back onto the REST path, query, body, and headers of your operation, runs the request through your existing policies, and returns the backend's response as an MCP result. To inspect that on the wire:\n\n```\ncurl -X POST \"https://my-gateway-a12bcd345e67f89g0h.uc.gateway.dev/mcp\" \\\n  -H \"content-type: application/json\" \\\n  -H \"MCP-Protocol-Version: 2025-11-25\" \\\n  -H \"x-api-key: $API_KEY\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\n       \"params\":{\"name\":\"get_order_status\",\"arguments\":{\"orderId\":\"A-1042\"}}}'\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"content\":[{\"type\":\"text\",\n  \"text\":\"{\\\"orderId\\\":\\\"A-1042\\\",\\\"status\\\":\\\"IN_TRANSIT\\\",\\\"eta\\\":\\\"2026-09-24\\\"}\"}],\n  \"isError\":false}}\n```\n\nThe Public Preview covers REST and OpenAPI 3.x backends with your current authentication. MCP resources and prompts, response streaming, and Model Armor payload inspection are on the roadmap. A few limits are worth knowing up front: operations returning empty bodies such as HTTP 204 are not exposed, deeply nested object schemas may not render fully in `tools/list`, a gateway serves up to 1,000 tools, and MCP and model routing cannot be enabled in the same API config. See the [documentation](https://cloud.google.com/api-gateway/docs/mcp-overview) for the current scope.\n\nMCP support is available now in Public Preview. [Check out the documentation](https://cloud.google.com/api-gateway/docs/mcp-overview) and turn your first API into an agent-ready tool today.", "url": "https://wpnews.pro/news/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway", "canonical_source": "https://developers.googleblog.com/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway/", "published_at": "2026-09-24 16:32:48.875665+00:00", "updated_at": "2026-09-24 16:32:50.705036+00:00", "lang": "en", "topics": ["agent-protocols", "ai-agents", "ai-infrastructure", "developer-tools", "ai-products"], "entities": ["Google Cloud API Gateway", "Model Context Protocol", "Agent Development Kit", "Gemini Enterprise", "Apigee", "Agent Gateway", "Cloud Run", "OpenAPI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway", "markdown": "https://wpnews.pro/news/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway.md", "text": "https://wpnews.pro/news/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway.txt", "jsonld": "https://wpnews.pro/news/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway.jsonld"}}