api-gateway-mcp-server
하는 일
Google Cloud API Gateway를 사용해 기존 REST API를 도구로서 AI 에이전트에 노출하도록 개발자를 돕습니다. 현재 API를 다시 쓰지 않고 에이전트가 사용하기를 원하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓AI 에이전트가 Google Cloud API Gateway를 통해 기존 REST API를 도구로 쓰기를 원할 때.
- ✓MCP 서버로 작동하도록 OpenAPI 2.0 명세를 OpenAPI 3.x로 변환해야 할 때.
- ✓MCP 서버의 도구 목록을 JWT나 API 키로 보호하고 싶을 때.
스킬 링크
https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“회사의 기존 API를 Google Cloud API Gateway를 통해 AI 에이전트가 쓸 수 있는 도구로 바꿔 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 OpenAPI 파일에 MCP 주석을 추가해, 게이트웨이가 에이전트 요청을 백엔드에 대한 일반 호출로 바꾸도록 합니다. 기존 로그인과 제한 규칙도 그대로 적용됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
API Gateway Remote MCP Server (Public Preview)
This skill converts new or existing REST APIs on Google Cloud API Gateway into remote Model Context Protocol (MCP) servers (POST https://{default_hostname}/mcp, Public Preview). By annotating an OpenAPI 3.x (3.0.x or 3.1.x) specification with x-google-api-management.mcp and x-google-mcp-tool, API Gateway translates MCP JSON-RPC 2.0 requests (initialize, notifications/initialized, tools/list, tools/call) into standard HTTP REST requests to your backend while enforcing existing authentication and quota policies.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:api-gateway-mcp-server)"
and append agent-skills/1.0 (skill:api-gateway-mcp-server) to User-Agent headers.
Prerequisites
- Install the Google Cloud CLI and the validator dependency:
- Install the Google Cloud CLI. Then update it to the latest version with
gcloud components update. An old CLI can fail when it uploads an OpenAPI 3.x API config. - Install Python 3.10 or later and
PyYAMLfor the local OpenAPI MCP validator script:pip install "PyYAML>=6.0,<7.0"
- Install the Google Cloud CLI. Then update it to the latest version with
- Authenticate your environment:
- Local CLI session:
gcloud auth login - Application Default Credentials (SDKs / ADK):
gcloud auth application-default login
- Local CLI session:
- Select or create a project, confirm billing, and pick a supported gateway location:
- Select an existing project (
gcloud config set project {project_id}) or create one (gcloud projects create {project_id}). - Confirm that an active billing account is linked to
{project_id}. API Gateway has a free monthly allowance of API calls for each billing account, but you still need an active billing account to deploy. Calls above the allowance and network data transfer out are charged. For current prices, see API Gateway pricing. - Use
us-central1as the default--locationfor gateway commands. For the other supported regions, see API Gateway deployment model.
- Select an existing project (
- Enable the required Google Cloud APIs:
For API hub discovery (optional), enable the API hub API in the API hub host project:gcloud services enable \ apigateway.googleapis.com \ servicemanagement.googleapis.com \ servicecontrol.googleapis.com \ --project={project_id}gcloud services enable apihub.googleapis.com --project={hub_project_id}. To query Agent Registry (optional), also rungcloud services enable agentregistry.googleapis.com --project={project_id}. - Verify the IAM roles (use the most restrictive role for each step):
- To create and update the API, API configs, and gateways: API Gateway Admin (
roles/apigateway.admin) on{project_id}. To run thegcloud services enablecommands: Service Usage Admin (roles/serviceusage.serviceUsageAdmin) on that project. - To reference the gateway service account in an API config: Service Account User (
roles/iam.serviceAccountUser) on{gateway_sa_name}@{project_id}.iam.gserviceaccount.com. - For a Cloud Run backend: grant the gateway service account the Cloud Run Invoker role (
roles/run.invoker) on the service. - To mint test ID tokens as a caller service account: Service Account Token Creator (
roles/iam.serviceAccountTokenCreator) on{caller_sa_email}. - Reference: Configure the development environment.
- To create and update the API, API configs, and gateways: API Gateway Admin (
Decision Matrix: MCP Server Configuration and Client Integration
| Task | Required Mechanism | Critical Guardrail | Detailed Reference |
|---|---|---|---|
Migrate OpenAPI 2.0 (swagger: "2.0") or author OpenAPI 3.x for MCP |
Root x-google-api-management.mcp + named backends + operation-level x-google-mcp-tool |
NEVER add MCP extensions to an OpenAPI 2.0 spec. Rationale: MCP is not supported for OpenAPI 2.0. Use OpenAPI 3.0.x or 3.1.x, and deploy the spec with gcloud api-gateway api-configs create. Keep all MCP operations in one OpenAPI document: if an API con |
자주 묻는 질문
정식으로 제공되는 기능인가요?
아닙니다. 스킬은 이를 Public Preview라고 설명하므로 세부 사항이 바뀔 수 있습니다.
REST API 동작이 바뀌나요?
원격 MCP 엔드포인트를 추가하며, 기존 인증과 할당량 규칙은 그대로 둡니다.
최신 Google Cloud CLI가 필요한가요?
네. 오래된 버전은 OpenAPI 3.x 설정에서 실패할 수 있으므로 CLI 업데이트를 권장합니다.
상세 정보
작성자의 원본 설명
Configures Google Cloud API Gateway to act as a remote Model Context Protocol (MCP) server (Public Preview) that exposes REST APIs as agent tools over HTTP (POST /mcp). Use when migrating OpenAPI 2.0 specs to OpenAPI 3.x for MCP, annotating specs with x-google-api-management.mcp and x-google-mcp-tool, securing tools/list with JWTs or API keys, connecting Google ADK (McpToolset) or Apigee API hub and Agent Registry, or troubleshooting MCP JSON-RPC errors (-32601, -32602, -32000). Do not use for Apigee X proxy bundles, outbound LLM model routing, or GKE Gateway API.
repo: google/skills
인기도
- GitHub 스타
- 22k
- 순위
- #10214
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
finding-google-skills
22k에이전트가 호스팅, 데이터베이스, 저장소, 로그인, AI 모델 제공처럼 설정 작업에 맞는 Google 가이드를 찾도록 돕습니다.
gcloud
22k에이전트가 Google Cloud gcloud 명령을 작성하고 확인하도록 돕습니다. 플래그를 추측하지 않도록 무엇이든 실행하기 전에 정확한 문법을 확인합니다.
google-cloud-recipe-auth
22k에이전트가 Google Cloud의 신원과 접근 권한을 안내합니다. 사람과 서비스가 어떻게 로그인하고 어떤 권한을 받는지 포함합니다.
google-cloud-recipe-onboarding
22k새 개발자가 Google Cloud에서 프로젝트 선택, 결제 연결, 첫 리소스 배포 같은 첫 단계를 밟도록 안내합니다.
비슷한 스킬
mcporter
394k에이전트가 HTTP나 stdio로 MCP 서버와 그 도구를 목록화하고, 호출하고, 점검하며, 로그인 설정을 관리하도록 돕습니다.
fastmcp
260kAPI, 데이터베이스, 파일에 AI 어시스턴트가 도구로 접근할 수 있도록 Python MCP 서버를 만들고 테스트하고 배포하도록 돕습니다.
mcp-oauth-remote-gateway
260kHermes가 서버에서 실행될 때 일반 브라우저 로그인이 닿지 않는 경우를 위해, 원격 MCP 서버의 OAuth 로그인을 단계별로 안내합니다.