Skip to main content
skill CX Codex

gcp-mcp-setup — Claude Code & Gemini CLI skill: what it does

gcp-mcp-setup — a skill for Claude Code, Codex, and Gemini CLI that wires up Google Managed MCP servers (OneMCP) to your CLI environment. It enables APIs, generates an API key, and writes the MCP config to the right settings file.

Apache-2.0 ★ 151 updated 2026-10-12

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Open on GitHub

What gcp-mcp-setup does

The skill executes setup_onemcp.py, which enables Google Cloud APIs, provisions MCP servers, and writes the mcpServers block to your active harness config. The default set covers Logging, Monitoring, GKE, Run, Resource Manager, and Developer Knowledge. Pass --all to also bring in Error Reporting, Cloud SQL, Spanner, Pub/Sub, Vertex AI, Firestore, and BigQuery.

Where the config lands depends on the harness: Gemini CLI writes .gemini/settings.json locally or ~/.gemini/settings.json globally; Copilot CLI only writes to ~/.copilot/mcp-config.json with no workspace-level option. Use --harness gemini, --harness antigravity, or --harness copilot to target a specific one.

MCP servers authenticate through Application Default Credentials, not the gcloud auth login session. When these two identities differ, API calls fail with serviceusage.serviceUsageConsumer denied even if gcloud commands run fine. The verify_setup.py script checks identity consistency and confirms all expected google-* servers are registered.

What it helps with

  • connect OneMCP to Gemini CLI in a single run
  • provision MCP servers across multiple CLI harnesses at once
  • auto-generate an API key and write the config file
  • add Vertex AI and BigQuery via the --all flag
  • diagnose a mismatch between gcloud and ADC identities

Example prompts for the agent

  • Set up OneMCP for project my-gcp-project targeting the Gemini CLI harness
  • Run gcp-mcp-setup with --all to include Firestore and BigQuery
  • Verify all google-* MCP servers are registered after setup in Codex

How to install gcp-mcp-setup

1Plugin marketplace

/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre

This installs the whole sre-extension plugin with all its skills

2Skills CLI (Vercel)

npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a claude-code

3Manually: put the files in place

~/.claude/skills/gcp-mcp-setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gcp-mcp-setup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gcp-mcp-setup

How do I install gcp-mcp-setup in Claude Code?

Run /plugin marketplace add gemini-cli-extensions/sre, then /plugin install sre-extension@sre. You can also use npx skills add gemini-cli-extensions/sre --skill gcp-mcp-setup -a claude-code, which places the skill at ~/.claude/skills/gcp-mcp-setup/SKILL.md.

What does gcp-mcp-setup do?

It runs a setup script that enables the required Google Cloud APIs, provisions Google Managed MCP servers, and writes the mcpServers configuration block to the settings file for your chosen CLI harness.

Why do MCP servers fail even though gcloud commands work?

MCP servers use Application Default Credentials rather than your gcloud auth login session. Run gcloud auth application-default login --account <PROPOSED_IDENTITY_EMAIL> to align the two identities, then re-run verify_setup.py to confirm.

Source text

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

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set17

The whole set →
pre-publish-checker pre-publish-checker audits project files for profanity, internal links, sensitive paths, and unfinished development markers. Use it when preparing code or an extension for public release. CX Codex +1 ★ 151repo stars safe-sre-investigator safe-sre-investigator creates dedicated read-only service accounts for GCP and Kubernetes, then hands you gcloud and kubectl commands with a risk rating attached. CX Codex +1 ★ 151repo stars cloud-monitoring Interacts with Google Cloud Monitoring through MCP, rendering ASCII sparklines and concise CSV summaries to prevent context bloat. CX Codex +1 ★ 151repo stars postmortem-aggregator postmortem-aggregator turns Post Mortem files in a folder into incident statistics and updates POMO_AGGREGATED.md. Use it to spot recurring causes across incidents. CX Codex +1 ★ 151repo stars generic-mitigations generic-mitigations guides your agent to halt production outages quickly using standard SRE strategies before diving into root-cause analysis. CX Codex +1 ★ 151repo stars monitoring-graphs monitoring-graphs — a skill for Claude Code, Codex and Gemini CLI that generates annotated incident graphs in Python. Use it to visualize outages, plot error spikes, or correlate metrics with incident milestones. CX Codex +1 ★ 151repo stars anomaly-detection anomaly-detection detects outliers in time-series metrics from CSV, cloud monitoring, and other sources. Chooses smoothing and algorithms automatically, or accepts your tuning parameters. CX Codex +1 ★ 151repo stars investigation-entrypoint The investigation-entrypoint skill for Claude Code, Codex, and Gemini CLI coordinates GCP incident investigations across GKE and Cloud Run. CX Codex +1 ★ 151repo stars

Project sponsors

Companies that keep this analytics open