1---
2name: gcp-compute-ops
3description: "Google Cloud Compute Engine — VM instances, disks, templates, instance groups, reservations, project discovery. Use when listing GCP VMs, troubleshooting a Compute Engine instance, checking disk attachments, planning capacity with reservations and commitments, or managing instance groups."
4version: 1.0.0
5license: Apache-2.0
6tags: [gcp, compute-engine, vm, instances, disks, resource-manager]
7
8netshell:
9 mcp_tools:
10 - mcp: gcp-compute-mcp
11 tools:
12 - search_projects
13 - list_instances
14 - get_instance
15 - list_disks
16 - get_disk
17 - list_instance_templates
18 - list_instance_groups
19 - list_machine_types
20 - list_zones
21---
22
23# GCP Compute Operations
24
25## MCP Servers
26
27- **Compute Engine**: `https://compute.googleapis.com/mcp` (Streamable HTTP)
28- **Resource Manager**: `https://cloudresourcemanager.googleapis.com/mcp` (Streamable HTTP)
29- **Auth**: OAuth 2.0 via Google IAM — service account key (`GOOGLE_APPLICATION_CREDENTIALS`) or `gcloud auth application-default login`
30- **Requires**: `GCP_PROJECT_ID` environment variable
31
32## Key Difference from On-Prem MCP Servers
33
34Google Cloud MCP servers are **remote HTTP endpoints** hosted by Google — nothing to install locally. Authentication uses OAuth 2.0 / Google IAM, not API keys. The transport is Streamable HTTP, not stdio.
35
36## Available Tools (29)
37
38### Resource Manager (1 tool)
39
40| Tool | What It Does |
41|------|-------------|
42| `search_projects` | Search for GCP projects by parent, ID, or filter. Use this first to discover available projects. |
43
44### Instance Management (8 tools)
45
46| Tool | What It Does |
47|------|-------------|
48| `list_instances` | List VM instances in a project (filter by zone) |
49| `get_instance_basic_info` | Get core instance details — name, status, machine type, network interfaces, IPs |
50| `create_instance` | Provision a new VM instance |
51| `delete_instance` | Remove a VM instance |
52| `start_instance` | Boot a stopped instance |
53| `stop_instance` | Halt a running instance |
54| `reset_instance` | Restart an instance (hard reset) |
55| `set_instance_machine_type` | Resize an instance (change machine type) |
56
57### Instance Groups (3 tools)
58
59| Tool | What It Does |
60|------|-------------|
61| `list_instance_group_managers` | List managed instance groups (MIGs) |
62| `get_instance_group_manager_basic_info` | Get MIG details — template, target size, autoscaling |
63| `list_managed_instances` | List instances within a MIG |
64
65### Instance Templates (3 tools)
66
67| Tool | What It Does |
68|------|-------------|
69| `list_instance_templates` | List available instance templates |
70| `get_instance_template_basic_info` | Get template basics — name, description |
71| `get_instance_template_properties` | Get template specs — machine type, disks, network interfaces |
72
73### Disks & Storage (5 tools)
74
75| Tool | What It Does |
76|------|-------------|
77| `list_disks` | List persistent disks in a project |
78| `get_disk_basic_info` | Get disk metadata — size, type, attached instances |
79| `get_disk_performance_config` | Get disk performance settings — IOPS, throughput |
80| `list_snapshots` | List disk snapshots |
81| `list_instance_attached_disks` | List disks attached to a specific instance |
82
83### Resource Discovery (3 tools)
84
85| Tool | What It Does |
86|------|-------------|
87| `list_machine_types` | List available machine types in a zone (e2, n2, c3, etc.) |
88| `list_accelerator_types` | List available GPU/TPU types in a zone |
89| `list_images` | List available boot images (Debian, Ubuntu, CentOS, etc.) |
90
91### Reservations & Commitments (6 tools)
92
93| Tool | What It Does |
94|------|-------------|
95| `list_reservations` | List capacity reservations |
96| `get_reservation_basic_info` | Get reservation details |
97| `get_reservation_details` | Get comprehensive reservation info |
98| `list_commitments` | List committed use discounts (CUDs) |
99| `get_commitment_basic_info` | Get commitment details — term, status |
100| `list_commitment_reservations` | List reservations tied to a commitment |
101
102### Operations (1 tool)
103
104| Tool | What It Does |
105|------|-------------|
106| `get_zone_operation` | Check status of an async operation (create, delete, resize) |
107
108## Workflow: GCP Infrastructure Audit
109
110When a user asks "show me our GCP compute resources":
111
1121. **Discover projects**: `search_projects` to list all accessible GCP projects
1132. **List instances**: `list_instances` per project — name, status, zone, machine type
1143. **Network interfaces**: `get_instance_basic_info` to see IPs, VPC, subnet per VM
1154. **Instance groups**: `list_instance_group_managers` for autoscaled workloads
1165. **Disk inventory**: `list_disks` — size, type, attached instances
1176. **Report**: GCP compute inventory with status and network details
118
119## Workflow: VM Troubleshooting
120
121When investigating a GCP VM issue:
122
1231. **Find the VM**: `list_instances` filtered by name or zone
1242. **Get details**: `get_instance_basic_info` — status, machine type, network interfaces, external IP
1253. **Check disks**: `list_instance_attached_disks` — any missing or detached?
1264. **Check operation**: `get_zone_operation` — any pending/failed operations?
1275. **Cross-reference**: Use `gcp-cloud-logging` for instance logs, `gcp-cloud-monitoring` for metrics
1286. **Report**: VM health assessment with findings
129
130## Workflow: Capacity Planning
131
132When planning GCP compute capacity:
133
1341. **Current usage**: `list_instances` — count by machine type and zone
1352. **Reservations**: `list_reservations` — reserved capacity vs actual usage
1363. **Commitments**: `list_commitments` — CUD utilization and expiration
1374. **Available types**: `list_machine_types` — what's available in target zones
1385. **GPU availability**: `list_accelerator_types` — GPU/TPU options per zone
1396. **Report**: Capacity utilization with recommendations
140
141## Important Rules
142
143- **Google Cloud MCP servers are remote** — no local install, runs on Google's infrastructure
144- **OAuth 2.0 authentication** — uses service account or user credentials via IAM
145- **Project-scoped** — all operations are scoped to the configured GCP project
146- **Write operations available** — unlike AWS Network MCP, Compute Engine MCP can create/modify/delete VMs. Use ServiceNow CR gating for changes.
147- **Record in GAIT** — log all GCP operations for audit trail
148
149## Environment Variables
150
151- `GCP_PROJECT_ID` — Google Cloud project ID
152- `GOOGLE_APPLICATION_CREDENTIALS` — Path to service account key JSON file (or use `gcloud auth application-default login`)