When you build AI agents that need to interact with real services, those services typically live behind REST APIs. Until now, making one usable by an agent required setting up an entirely separate Model Context Protocol (MCP) server — duplicating the authentication, routing, and quotas your API gateway already handles.
Google Cloud API Gateway now removes that friction. In Public Preview, you can annotate your existing OpenAPI spec to expose REST operations as MCP tools directly through the gateway — no extra infrastructure needed.
Why this matters for beginners
If you’re learning to build agents with frameworks like the Agent Development Kit (ADK) or Gemini Enterprise, MCP is the standard way your agent discovers and calls tools. Previously:
- Tool setup was complex: You needed to run and maintain an MCP server that mirrored your API gateway’s logic
- Policies diverged: Authentication and quotas for REST vs. MCP calls could drift apart
- Discovery was manual: Agents couldn’t automatically find available tools
Now:
| Before | After |
|---|---|
| Separate MCP server required | MCP served directly from API Gateway |
| Policies maintained in two places | One set of auth/quota rules covers both REST and MCP |
| Tools registered manually | Gateway publishes to API Hub and Agent Registry automatically |
Tip
This doesn’t replace Apigee for full enterprise API management or Agent Gateway for outgoing call governance. It’s the lightweight path for services on Cloud Run.
How it works technically
- Annotate your OpenAPI spec:
- Enable MCP at the document level with
x-google-api-management.mcp - Customize tool behavior per operation with
x-google-mcp-tool - Critical: Write descriptive tool explanations — LLMs use these to decide when to call them
- Enable MCP at the document level with
x-google-mcp-tool:
name: get_order_status
description: "Look up delivery status and ETA. Use when asked where an order is or when it will arrive."
-
Deploy normally: The gateway generates MCP support automatically on the
/mcppath -
Control discovery: Secure
tools/listwith JWT (API keys won’t work here) whiletools/callinherits your REST operation’s auth -
Connect your agent: Point any MCP client like ADK to the gateway’s
/mcpendpoint with your existing credentials
What you can do now
- Expose existing APIs: Turn well-documented REST operations into agent tools in minutes
- Maintain one policy set: Authentication and quotas apply consistently whether called via REST or MCP
- Publish discoverably: Gateways with MCP enabled automatically appear in API Hub and Agent Registry
Current limitations
While in Public Preview:
- No support for OpenAPI 2.0 — migrate to 3.x first
- Operations returning HTTP 204 (no content) can’t be exposed
- Maximum 1,000 tools per gateway
- No MCP + model routing in the same API config
Getting started
- Migrate to OpenAPI 3.x if needed
- Annotate your spec with MCP metadata
- Deploy to API Gateway as usual
- Connect your agent to the
/mcpendpoint
Important
Tool descriptions directly impact whether your agent calls them correctly. Focus on when and why to use the tool, not just what it returns.
For beginners, this eliminates a major infrastructure hurdle when connecting agents to real services. Instead of operating parallel systems, you can focus on designing useful tool interactions.
Read next
- What OpenAI Academy Means for Beginners Learning to Build with AI
- Better Prompt Caching in GPT-6: What It Means for Beginners Building AI Agents
Want to try all of this hands-on? Start with the free Claude Code from Zero course.
Source
Based on Google’s announcement, “Turn your REST APIs into MCP tools with Google Cloud API Gateway”. Written for people learning to build with these tools.