Resolving Mcp Region Configs

作者 gemini-cli-extensions2df10e25bbf7Apache-2.0215 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Mandatory Step 0 pre-flight check for regional Google Cloud MCP servers (e.g. Dataproc) before using MCP tools or falling back to gcloud/bq CLI. Use whenever interacting with Dataproc clusters, Spark batches, jobs, sessions, or regional GCP resources. Fixes regional MCP servers whose endpoint URL still has an unreplaced $GCP_REGION / ${REGION} placeholder across Claude Code, Codex, and Antigravity. Trigger: an expected mcp__*_{service}_* tool is missing entirely (not just failing), or a call to one fails/hangs on a malformed host. Check via ToolSearch/deferred-tools listing before falling back to gcloud/bq CLI. Asks the user for a region, patches the live MCP config file(s), and tells the user how to restart without losing session context.

AI 產生的概覽

修復區域性 Google Cloud MCP 伺服器設定中未取代的區域佔位符,讓缺少的 MCP 工具得以註冊。

功能
當預期的區域性 Google Cloud MCP 工具(例如 Dataproc 工具)缺少,或因主機格式錯誤而呼叫失敗時,此技能會執行預檢。它會檢查 Claude Code、Codex 和 Antigravity 的即時 MCP 設定檔中是否有未取代的區域佔位符,例如 $GCP_REGION 或 ${REGION}。在向使用者詢問其 GCP 區域後,它會在相關設定檔中取代該佔位符,並告知使用者如何在不遺失工作階段內容的情況下重新啟動。
適用情境
當任務涉及區域性 Google Cloud 服務(如 Dataproc 叢集、Spark 批次、作業或工作階段),且對應的 MCP 工具缺少或呼叫失敗時使用。它適用於退回使用 gcloud 或 bq CLI 指令之前,且僅在區域佔位符仍未取代時適用。
執行需求
無指令碼,僅為指示。需要存取 Claude Code、Codex 或 Antigravity 的本機 MCP 設定檔,且使用者必須提供其 GCP 區域。

Regional MCP Server Configuration

Mandatory Step 0 Pre-Flight Check

[!IMPORTANT] Pre-Flight Check Before Using Dataproc / Regional Services or Falling Back to CLI: Whenever a task involves a regional Google Cloud service (e.g. Dataproc clusters, Spark batches, jobs, or sessions): 1. Check for MCP tools first: Before executing any gcloud dataproc or CLI commands, check whether the expected mcp__*__<service>__* tools (e.g. mcp__*__dataproc__*) are registered in the current environment (ToolSearch or deferred tools). 2. If tools are missing or calls fail/hang on a malformed host: Do NOT immediately fall back to gcloud/bq CLI. Inspect the live MCP configuration files (below) for unreplaced $GCP_REGION, ${REGION}, or ${user_config.GCP_REGION} placeholders. 3. If the region placeholder is already replaced with a valid region (e.g. us-central1): This skill does not apply — proceed normally with the task.

Some Google Cloud MCP servers are region-scoped (e.g. Dataproc: https://dataproc-$GCP_REGION.googleapis.com/mcp). If the region placeholder was never filled in, the server fails to connect silently — it registers zero tools, with no error and no placeholder string visible anywhere to notice. Treat a missing mcp__*__<service>__* tool as the trigger, not just a failed call — that's the most common way this skill gets skipped in favor of a gcloud/bq fallback.

When to use

  • User asks to use a regional service (e.g. "list dataproc clusters"), and the matching mcp__* tools aren't present — check ToolSearch or the deferred-tools listing first — or a call to one fails/hangs on a malformed host.
  • Then inspect the live config (below) for $GCP_REGION, ${REGION}, or ${user_config.GCP_REGION}. If found, run the procedure. If the region is already set, this skill doesn't apply — investigate normally instead.

Supported services

  • Dataproc: https://dataproc-$GCP_REGION.googleapis.com/mcp

Locating the live config

The file actually loaded at runtime is under the plugin's install/cache path, not just any workspace copy — edit that one (and the source copy, best-effort, so the fix survives a reinstall):

  • Claude Code: ~/.claude/plugins/cache/<marketplace>/dak/<version>/.claude-mcp.json (get <marketplace>/<version> from ~/.claude/plugins/installed_plugins.json). Also check ./.claude-mcp.json and claude_desktop_config.json.
  • Codex: ~/.codex/plugins/cache/**/dak/**/.mcp.json (or mcp.json). Also check ~/.agents/plugins/dak/.mcp.json, ./.mcp.json, and ~/.codex/config.toml ([mcp_servers.<name>]).
  • Antigravity: ./mcp_config.json or ~/.gemini/antigravity/mcp_config.json.

Procedure

  1. You MUST NOT call the regional tools yet — there likely aren't any to call.

  2. You MUST ask the user for their GCP region (e.g. us-central1). You MUST NOT guess.

  3. You MUST edit the placeholder to that region in the config file(s) above.

  4. You MUST tell the user to restart — MCP connections load once at startup and won't hot-reload mid-session. Restarting does not lose the conversation:

    • Claude Code: claude --resume (or --continue)
    • Codex: codex resume --last (or codex resume for a picker)
    • Antigravity: use its resume/history picker if available

來源與署名

來源:gemini-cli-extensions/data-agent-kit-starter-pack位於skills/resolving-mcp-region-configs提交2df10e2

授權條款: Apache-2.0

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 gemini-cli-extensions/data-agent-kit-starter-pack 的技能

Schema Mapping

gemini-cli-extensions

為 ETL、ELT 或資料整合任務規劃來源到目標的結構描述對應,產出文件化的對應宣言。

Data & Analytics215今天更新

Notebook Guidance

gemini-cli-extensions

This skill guides the use of Jupyter notebooks for data analysis, exploration, and visualization, particularly with BigQuery. It outlines best practices for notebook execution and validation (supporting both cell-by-cell execution and full notebook generation depending on tool availability), library installation, and structuring notebooks for clarity. It also covers specific rules for data cleaning, plotting, and integrating with BigQuery SQL and machine learning workflows. Relevant when any of the following conditions are true: 1. The user request involves a data analysis, data exploration, data visualization, or data insights task that requires multiple steps, queries, or visualizations to answer. 2. The user explicitly requests a notebook (.ipynb). 3. You are creating, editing, or executing cells in a Jupyter notebook. 4. You need to query BigQuery from within a notebook. DO NOT use the Python BigQuery client library; instead, you MUST use the `%%bqsql` magics explained in this skill.

待分類215今天更新

Ml Best Practices

gemini-cli-extensions

為機器學習筆記本提供逐步方案,涵蓋分群、預測、分類、迴歸與模型比較。

Data & Analytics215今天更新

Managing Python Dependencies

gemini-cli-extensions

指導代理偵測 Python 專案的相依性管理器並正確安裝套件,而不是使用全域 pip。

Software Development215今天更新

Google Cloud Storage Fuse

gemini-cli-extensions

Mounts Cloud Storage buckets as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when you need to interact with gcsfuse — decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or Cloud Run, enable and size the file, stat, and list caches, tune mount flags or config-file settings, apply workload profiles, keep ML checkpointing safe (rename atomicity, hierarchical namespace, close-time finalization, concurrent writers), or diagnose slow training, low throughput, or GCS bill spikes on existing mounts with gcsfuse metrics. Covers mount semantics, the gcsfuse CLI and config file, the GKE gcsfuse CSI driver (Workload Identity principal:// bindings, profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use for bucket administration or data management without a mount (google-cloud-storage-basics) or for fully POSIX-compliant shared file systems (Filestore, Managed Lustre).

待分類215今天更新

Google Cloud Auth Verification

gemini-cli-extensions

Mandatory Step 0 pre-flight execution order and authentication verification for Google Cloud Platform (GCP), Application Default Credentials (ADC), gcloud CLI, Spark, Dataproc, BigQuery, GCS, and notebook runtimes. Use whenever interacting with GCP resources, running Spark/PySpark pipelines, BigQuery queries, GCS paths (gs://), or creating/running notebooks.

待分類215今天更新