본문으로 건너뛰기
Skillpedia
커넥터 (MCP)22k · #10214

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  1. 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 PyYAML for the local OpenAPI MCP validator script:
      pip install "PyYAML>=6.0,<7.0"
      
  2. Authenticate your environment:
    • Local CLI session: gcloud auth login
    • Application Default Credentials (SDKs / ADK): gcloud auth application-default login
  3. 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-central1 as the default --location for gateway commands. For the other supported regions, see API Gateway deployment model.
  4. Enable the required Google Cloud APIs:
    gcloud services enable \
      apigateway.googleapis.com \
      servicemanagement.googleapis.com \
      servicecontrol.googleapis.com \
      --project={project_id}
    
    For API hub discovery (optional), enable the API hub API in the API hub host project: gcloud services enable apihub.googleapis.com --project={hub_project_id}. To query Agent Registry (optional), also run gcloud services enable agentregistry.googleapis.com --project={project_id}.
  5. 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 the gcloud services enable commands: 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.

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬