Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Turn your rest apis into mcp tools with google cloud api gateway
Dev48

© 2026 · All rights reserved.

Turn your REST APIs into MCP tools with Google Cloud API Gateway

Источник: Gemini

Turn your REST APIs into MCP tools with Google Cloud API Gateway

Source: Gemini

Google Cloud API Gateway now acts as a native remote Model Context Protocol (MCP) server, eliminating the need to build and maintain custom middleware to expose REST APIs to AI agents. By simply adding specific annotations (like x-google-api-management.mcp) to existing OpenAPI 3.x specifications, developers can instantly convert standard REST operations into discoverable, agent-ready tools. The ga

September 25, 2026

SEPT. 24, 2026

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.

Google Cloud API Gateway 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.

API 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. To govern what your agents call on the way out, including MCP servers like this one, use Agent Gateway. Model routing, which gives you one stable endpoint for outbound LLM calls, is the companion capability for the other direction of AI traffic.

How it works

API 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.

  • Annotate your OpenAPI spec. MCP requires OpenAPI 3.0.x or 3.1.x; OpenAPI 2.0 is not supported, so if your gateway still runs a 2.0 spec, migrate it first. Opt in at the document level with 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.

Plain text

Copied

A 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.

2. 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.

3. 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:

Plain text

Copied

tools/call always enforces whatever authentication the underlying REST operation requires, whether or not you secure discovery.

4. 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:

Python

Copied

The 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:

Shell

Copied

JSON

Copied

Why serve MCP from the gateway

  • Discoverable. Connect your gateway to API hub and its MCP server is published there with MCP-specific metadata and appears in Agent Registry automatically, so agents and developers can find the tools it exposes.
  • Nothing new to operate. Your existing spec, gateway, authentication, quotas, and logging do the work — MCP and REST traffic stay consistent because they share one policy path.

The 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 for the current scope.

Get started

MCP support is available now in Public Preview. Check out the documentation and turn your first API into an agent-ready tool today.

Previous

Next

← All articles

More in AI & Machine Learning

All →
Unsecured OpenAI agents posted 53 user images on the internet without the lab’s knowledgeПресса
OpenAI

Unsecured OpenAI agents posted 53 user images on the internet without the lab’s knowledge

Building Production Agents with Jev and LangGraph
LangChain

Building Production Agents with Jev and LangGraph

LangSmith Custom Apps: Build custom interfaces around your agent data
LangChain

LangSmith Custom Apps: Build custom interfaces around your agent data

For months, OpenAI’s agent swarms have been attacking online databases to find obscure factsПресса
OpenAI

For months, OpenAI’s agent swarms have been attacking online databases to find obscure facts

Tesla finally moves to electrify trucking after a decade of work and delaysПресса
Tesla

Tesla finally moves to electrify trucking after a decade of work and delays

New in LangSmith: Engine v2, Managed Deep Agents, Fine-Tuning, and more
LangChain

New in LangSmith: Engine v2, Managed Deep Agents, Fine-Tuning, and more

More from Gemini

Why client SDK generation belongs in the open
Gemini

Why client SDK generation belongs in the open

Introducing Support for Local AI Models in the Antigravity SDK
Gemini

Introducing Support for Local AI Models in the Antigravity SDK

Reproducing OLMo 3 7B Pre-training in MaxText: case study of large scale training on TPUs
Gemini

Reproducing OLMo 3 7B Pre-training in MaxText: case study of large scale training on TPUs