tpu-devops
Allows managing Docker containers on TPU VMs, including starting, stopping, and debugging vLLM Docker containers.
Provides tools for managing Google Cloud TPU capacity, provisioning flex-start VMs and queued resources, deploying and debugging vLLM serving, monitoring health and logs, and managing the entire serving lifecycle on Google Cloud.
Supports storing and managing Hugging Face access tokens via Google Secret Manager for use with model deployments.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tpu-devopsprovision a TPU v5e-8 for Gemma 4 serving"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 tpu-skill-claude — TPU Management Skill & MCP Agent
This repository packages the tpu-management Claude Code skill and the tpu-devops MCP server: an AI DevOps/SRE agent for operating Google Cloud TPU capacity and Gemma 4 vLLM serving on TPU VMs. It finds and provisions TPU capacity (flex-start VMs, queued resources), starts and debugs vLLM, verifies model health, runs benchmarks, analyzes logs with the self-hosted Gemma 4 model, and tears everything down safely.
GitHub: https://github.com/xbill9/tpu-skill-claude
⚡ Quick Start — set up a project in one command
project-setup.sh installs the tpu-management skill and registers the tpu-devops MCP server for any project (idempotent — re-run to refresh):
./project-setup.sh /path/to/project --project <gcp-project-id> # one project (.mcp.json + .claude/skills)
./project-setup.sh --global # all projects (~/.claude/skills + user-scope MCP)
make init TARGET=/path/to/project ARGS='--project <id>' # same, refreshing skill snapshots firstIt uses the system python3 (warning with a pip install -r requirements.txt hint if server dependencies are missing — it never creates a venv), merges the server entry into the project's .mcp.json without touching other servers, and prints the remaining manual steps (restart Claude Code, gcloud auth, HF token). See ./project-setup.sh --help for all options. The installer is also bundled inside the skill itself (mcp/project-setup.sh), so an unzipped dist/tpu-management-skill.zip is self-installing.
This repo's own .mcp.json is gitignored (it embeds your GCP project id) and is generated automatically: ./init.sh registers the server on first run (leaving an existing entry untouched), or regenerate it any time with ./project-setup.sh . --project <gcp-project-id> [--model ... --accelerator ... --tp ...].
Related MCP server: MedGemma Vertex
📦 Installing the tpu-management Skill
Claude Code auto-discovers any skill folder containing a SKILL.md in two places:
Project-level:
<project>/.claude/skills/tpu-management/— available only in that project (this repo ships its own copy, so working inside this repo needs no install).User-level:
~/.claude/skills/tpu-management/— available in every project on the machine.
Pick the install path that fits:
Goal | Command |
This machine, all projects |
|
One specific project (skill and |
|
All projects + user-scope MCP registration |
|
Another machine |
|
Install from GitHub
Option A — Claude Code plugin marketplace (recommended):
/plugin marketplace add xbill9/tpu-skill-claude
/plugin install tpu-management@tpu-skill-claudeThis installs the tpu-management skill and registers the tpu-devops MCP server in one step, with updates managed by Claude Code (/plugin → manage/update). Configure the server through environment variables (e.g. GOOGLE_CLOUD_PROJECT, MODEL_NAME, ACCELERATOR_TYPE) — see SKILL.md or the get_help tool for the full list.
Option B — clone and install (all projects on this machine):
git clone https://github.com/xbill9/tpu-skill-claude
cd tpu-skill-claude
make skill-install # skill only
./project-setup.sh --global # skill + user-scope tpu-devops MCP serverOption C — zip install, no clone (straight from the packaged zip):
curl -L -o /tmp/tpu-management-skill.zip \
https://github.com/xbill9/tpu-skill-claude/raw/main/dist/tpu-management-skill.zip
mkdir -p ~/.claude/skills && unzip -o /tmp/tpu-management-skill.zip -d ~/.claude/skills/
~/.claude/skills/tpu-management/mcp/project-setup.sh --global # optional: register the MCP serverAll of these first run make skill (refresh_skill.py), which regenerates the bundled snapshots from the repo-root sources: server.py, project-setup.sh, and requirements.txt are copied into the skill's mcp/ folder, and references/tpu-guide.md is rebuilt from tpu.md with the embedded screenshots stripped. SKILL.md and mcp/startup_script_template.sh are hand-maintained and never overwritten.
After installing (or updating), restart Claude Code or start a new session so it picks up the skill. Verify with /skills — tpu-management should be listed.
Because installs are refresh-and-copy (not symlinks), an installed copy goes stale when server.py, tpu.md, or SKILL.md changes — rerun make skill-install (or make init ...) after editing those files.
📂 Repository Layout
Path | Purpose |
| The |
| One-command installer: skill + MCP registration for a target project |
| Regenerates the bundled skill snapshots from the repo-root sources |
| Python dependencies for the MCP server |
|
|
| Project-level skill: |
|
|
| Plugin-layout copy of the skill (synced by |
| Packaged skill for zip installs (built by |
| GCP environment / credentials setup helpers |
| TPU getting started guide source (gitignored; the stripped, vendor-neutral text copy ships in |
🛠 Features & Capabilities
The tpu-devops MCP server covers the full TPU serving lifecycle (catalog with usage guidance in SKILL.md, live listing via the get_help tool):
Capacity discovery & provisioning: sweep zones for available capacity (
find_tpu_vmfor flex-start VMs,find_tpufor queued resources), check quotas (get_zones_with_available_quota), estimate cost, create flex-start TPU VMs (v6e/v5p) or legacy queued resources (v5e) with an auto-serving startup script, thenwait_for_vllm_readyuntil the model is up.Serving stack control: manage the vLLM Docker container (
manage_vllm_docker— works on both flex-start VMs and queued-resource nodes), fetch endpoints and the gcloud deployment one-liner, store the HF token in Secret Manager.Health, logs & diagnostics: system status dashboard covering both serving paths, model health verification, vLLM/docker/system/serial logs, Cloud Logging retrieval, and Gemma-4-powered log triage (
analyze_cloud_logging).Inference & benchmarking: query the deployed Gemma 4 endpoint (optional TTFT/throughput stats), run
vllm bench servefor benchmark metrics.Universal SRE help: a standardized
get_helptool describing the active configuration and all exposed tools.
🏗 Makefile Usage
make skill # Refresh skill snapshots from server.py / tpu.md (also syncs the plugin copy in skills/)
make skill-install # Refresh + copy the skill to ~/.claude/skills (all projects)
make skill-package # Refresh + build dist/tpu-management-skill.zip
make init TARGET=/path/to/project [ARGS='--project my-gcp-id']
# Refresh + install skill AND register the tpu-devops MCP serverEdit the repo-root sources (server.py, tpu.md, project-setup.sh), then run the appropriate target — never edit the snapshot copies directly.
⚙️ Configuration
The server reads its configuration from environment variables: GOOGLE_CLOUD_PROJECT (falls back to the active gcloud config), GOOGLE_CLOUD_ZONE (default europe-west4-a), GOOGLE_CLOUD_REGION, MODEL_NAME, ACCELERATOR_TYPE, TENSOR_PARALLEL_SIZE. Prerequisites: pip install -r requirements.txt, an authenticated gcloud CLI with alpha components, the TPU API enabled, and a Hugging Face token stored as Secret Manager secret hf-token (the save_hf_token tool does this for you).
🔒 Security & Credentials
When deploying to Google Cloud or Hugging Face, secure credentials using:
Hugging Face Access Token: Saved locally or to Google Secret Manager.
Application Default Credentials (ADC): Set up using GCP credentials helper scripts (
set_adc.sh).
📖 Related Documentation
SKILL.md — the skill itself: lifecycle, tool catalog, required vLLM flags, field notes, cautions
GEMINI.md — Gemini CLI integration via a LiteLLM proxy pointed at the self-hosted Gemma 4 TPU endpoint
references/tpu-guide.md— TPU getting started guide: flex-start zones, quotas, troubleshooting
Credits
Google Cloud credits are provided for this project.
#AgenticArchitect #GoogleAntigravity
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xbill9/tpu-skill-claude'
If you have feedback or need assistance with the MCP directory API, please join our Discord server