gcp-mcp-setup — скилл для Claude Code и Gemini CLI
Скилл gcp-mcp-setup для Claude Code, Codex и Gemini CLI автоматизирует подключение Google Managed MCP-серверов (OneMCP) к CLI-окружению. Включает нужные API, генерирует ключи и записывает конфигурацию в нужный файл настроек.
Apache-2.0 ★ 151 обновлён 2026-10-12
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sreЧто делает gcp-mcp-setup
Скилл работает на трёх платформах: Claude Code, Codex и Gemini CLI. Он запускает скрипт setup_onemcp.py, который включает Google API, поднимает MCP-серверы и записывает блок mcpServers в файл настроек активного окружения. По умолчанию подключаются Logging, Monitoring, GKE, Run, Resource Manager и Developer Knowledge. Флаг --all добавляет Error Reporting, Cloud SQL, Spanner, Pub/Sub, Vertex AI, Firestore и BigQuery.
Файл конфигурации зависит от целевого окружения: для Gemini CLI это .gemini/settings.json (локально) или ~/.gemini/settings.json (глобально), для Copilot CLI — ~/.copilot/mcp-config.json (только глобально). Флаг --harness позволяет явно указать gemini, antigravity или copilot.
MCP-серверы аутентифицируются через Application Default Credentials, а не через gcloud auth login. Если идентичности расходятся, запросы к API будут падать с ошибкой serviceusage.serviceUsageConsumer denied — даже когда gcloud-команды работают корректно. Проверить состояние после установки можно скриптом verify_setup.py.
Какие задачи решает
- подключить OneMCP к Gemini CLI одной командой
- настроить MCP-серверы для нескольких CLI-окружений разом
- сгенерировать API-ключ и записать конфигурацию автоматически
- включить Vertex AI и BigQuery через флаг
--all - диагностировать расхождение идентичностей gcloud и ADC
Примеры запросов агенту
- Установи OneMCP на проект
my-gcp-projectс настройкой для Gemini CLI - Запусти
gcp-mcp-setupс флагом--allи подключи Firestore и BigQuery - Проверь, что все
google-*серверы зарегистрированы в окружении Codex
Как установить gcp-mcp-setup
1Через маркетплейс плагинов
/plugin marketplace add gemini-cli-extensions/sre/plugin install sre-extension@sreКоманда ставит плагин sre-extension целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a claude-code3Вручную: положить файлы
~/.claude/skills/gcp-mcp-setup/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/gcp-mcp-setup/
1Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a codex2Вручную: положить файлы
.agents/skills/gcp-mcp-setup/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a cursor2Вручную: положить файлы
.cursor/skills/gcp-mcp-setup/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install gemini-cli-extensions/sre skills/gcp-mcp-setup2Вручную: положить файлы
.github/skills/gcp-mcp-setup/SKILL.md1Через Skills CLI (Vercel)
npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a gemini-cli2Командой платформы
gemini skills install https://github.com/gemini-cli-extensions/sre --path skills/gcp-mcp-setupВручную: положить файлы
.devin/skills/gcp-mcp-setup/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о gcp-mcp-setup
Как установить gcp-mcp-setup в Claude Code?
Сначала выполни /plugin marketplace add gemini-cli-extensions/sre, затем /plugin install sre-extension@sre. Альтернативный путь: npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a claude-code — скилл появится в ~/.claude/skills/gcp-mcp-setup/SKILL.md.
Что делает gcp-mcp-setup?
Скилл запускает скрипт настройки, который включает нужные Google API, поднимает Google Managed MCP-серверы и записывает блок конфигурации в файл настроек целевого CLI-окружения.
Почему MCP-серверы не работают после установки, хотя gcloud-команды проходят?
MCP-серверы используют Application Default Credentials, а не текущую сессию gcloud. При расхождении идентичностей нужно выполнить gcloud auth application-default login --account <PROPOSED_IDENTITY_EMAIL> и затем перезапустить verify_setup.py.
Исходный текст
SKILL.md · Apache-2.0
---
name: gcp-mcp-setup
description: 🐉 Use when the user wants to set up Google Managed MCP (OneMCP) servers for their CLI environment. Automates enabling services, MCP servers, generating API keys, and configuring the MCP settings file for the active harness (Gemini, Antigravity, or Copilot CLI).
metadata:
author: Riccardo
version: 0.0.10
status: published
---
# OneMCP Setup Skill
## Overview
This skill provides the automated steps to configure your environment and enable the **Core Google Managed MCP servers** (Logging, Monitoring, GKE, Run, Resource Manager, Developer Knowledge) by default. Use the `--all` flag to include additional services like Error Reporting, Cloud SQL, Spanner, Pub/Sub, Vertex AI, Firestore, and BigQuery.
## When to Use
Use this skill when the user asks to "install OneMCP", "setup OneMCP", or "configure Google Managed MCP servers".
## Core Pattern
1. **Prerequisites Verification**: Ensure the user has `gcloud` authenticated and a target Google Cloud Project with billing enabled.
2. **Setup Script Execution**: Run the provided script to enable APIs, MCP services, and generate the required API Key.
- By default, it installs a **Lean SRE toolset** (Logging, Monitoring, GKE, Run, Resource Manager, Developer Knowledge).
- Use the `--all` flag to include optional services (Error Reporting, Databases, Vertex AI).
- Use `--harness` to target a specific CLI harness (`gemini`, `antigravity`, or `copilot`). Defaults to `gemini+antigravity`.
- Script: `skills/gcp-mcp-setup/scripts/setup_onemcp.py <PROJECT_ID> [--local | --global] [--harness {gemini,antigravity,copilot}] [--all] [--google-maps-key YOUR_KEY]`
3. **Configure Settings**: The script automatically writes the `mcpServers` configuration to the correct location depending on the target harness:
- **Gemini CLI**: `.gemini/settings.json` (local) or `~/.gemini/settings.json` (global).
- **Antigravity CLI (agy)**: `.gemini/antigravity/mcp_config.json` and `.gemini/config/mcp_config.json` (local) or the global equivalents under `~/.gemini/`.
- **GitHub Copilot CLI**: `~/.copilot/mcp-config.json` (always global — no workspace-level config yet).
4. **Verification & Diagnostics:**
- Script: `skills/gcp-mcp-setup/scripts/verify_setup.py [--harness {gemini,antigravity,copilot}]`
- This script checks identity consistency (gcloud vs ADC), runs the harness-specific MCP list command, and confirms all expected google-* servers are registered.
## Examples
User: "Please install OneMCP on my project my-gcp-project"
Agent: "I will use the gcp-mcp-setup skill to configure your project and Gemini settings for Cloud Logging, Developer Knowledge, Firestore, and BigQuery."
## Authentication
Note that the **gcloud CLI Identity** (how you are currently logged in via `gcloud auth login`) may differ from the **MCP Server Identity** (which is based on Application Default Credentials, or ADC).
MCP servers typically use ADC to authenticate. If these identities do not match, you may encounter permission errors (e.g., `serviceusage.serviceUsageConsumer` denied) even if `gcloud` commands work correctly.
If MCP doesn't work, you can propose to run this on user's behalf: `gcloud auth application-default login --account <PROPOSED_IDENTITY_EMAIL>`
### 💡 Path Forward
If you encounter an identity mismatch:
1. Run `gcloud auth application-default login --account=YOUR_CLI_IDENTITY` to synchronize identities.
2. Verify the identities match by running the verification script: `python3 skills/gcp-mcp-setup/scripts/verify_setup.py`.
## Documentation
- Antigravity MCP integration guide: https://antigravity.google/docs/mcp
- Code samples from Romin Irani: https://github.com/rominirani/google-mcp-servers/blob/main/demos/README.md
- All supported products: https://docs.cloud.google.com/mcp/supported-products
© Riccardo · Apache-2.0 · gemini-cli-extensions/sre