resolving-mcp-region-configs
Skill240 starsChanged 5 months agoApache-2.0View on GitHub
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.
In this repository39 other files it gives its agents.
- accidental-data-loss-preventionSkill
- bigquery-ai-mlSkill
- bigquery-bigframesSkill
- bigquery-data-transfer-serviceSkill
- bigquery-graph-authorSkill
- bigquery-graph-querySkill
- bigquery-observabilitySkill
- bigquery-optimizationSkill
- bigquery-troubleshootingSkill
- bigtable-basicsSkill
- building-data-appsSkill
- cloud-databases-onboardingSkill
- dak-setupSkill
- data-autocleaningSkill
- dataform-bigquerySkill
- dbt-bigquerySkill
- discovering-gcp-data-assetsSkill
- enforcing-resource-attributionSkill
- federate-lakehouse-catalogSkill
- gcp-composer-troubleshootingSkill
- gcp-dataflowSkill
- gcp-data-pipelinesSkill
- gcp-managed-airflow-dag-authoringSkill
- gcp-managed-airflow-migrationsSkill
- gcp-managed-airflow-recommendationsSkill
- gcp-managed-spark-upgradesSkill
- gcp-pipeline-orchestrationSkill
- gcp-pipeline-resource-provisioningSkill
- gcp-spark-observabilitySkill
- gcp-sparkSkill
- gcp-spark-troubleshootingSkill
- gcs-security-assessmentSkill
- google-cloud-storage-basicsSkill
- google-cloud-storage-bucket-architectSkill
- google-cloud-storage-fuseSkill
- managing-python-dependenciesSkill
- ml-best-practicesSkill
- notebook-guidanceSkill
- schema-mappingSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
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 …
- Distinctive: line 79
Antigravity: use its resume/history picker if available
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 dataprocor CLI commands, check whether the expectedmcp__*__<service>__*tools (e.g.mcp__*__dataproc__*) are registered in the current environment (ToolSearchor deferred tools). 2. If tools are missing or calls fail/hang on a malformed host: Do NOT immediately fall back togcloud/bqCLI. Inspect the live MCP configuration files (below) for unreplaced$GCP_REGIONor${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 — checkToolSearchor the deferred-tools listing first — or a call to one fails/hangs on a malformed host. - Then inspect the live config (below) for
$GCP_REGIONor${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-plugin/mcp.json(get<marketplace>/<version>from~/.claude/plugins/installed_plugins.json). Also check./.claude-plugin/mcp.jsonandclaude_desktop_config.json. - Codex:
~/.codex/plugins/cache/<marketplace>/dak/<version>/mcp.json. - Antigravity:
./mcp_config.jsonor~/.gemini/antigravity/mcp_config.json.
Procedure
- You MUST NOT call the regional tools yet — there likely aren't any to call.
- You MUST ask the user for their GCP region (e.g.
us-central1). You MUST NOT guess. - You MUST edit the placeholder to that region in the config file(s) above.
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(orcodex resumefor a picker) - Antigravity: use its resume/history picker if available
- Claude Code:
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

