> ## Documentation Index
> Fetch the complete documentation index at: https://docs.civic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Compute Engine

> Full VM lifecycle management plus read-only inspection of disks, snapshots, templates, MIGs, and GPU availability

## Overview

The Google Compute Engine MCP server provides full VM lifecycle management plus rich read-only inspection of GCP compute infrastructure. You can create, start, stop, reset, resize, and delete VMs, as well as inspect disks, snapshots, instance templates, managed instance groups, and GPU availability.

**25 tools** — 6 write, 19 read-only.

<Info>
  **VM lifecycle is fully supported.** However, disks, snapshots, instance templates, MIGs, reservations, and commitments are read-only inspection targets — create and manage those via the GCP Console, `gcloud` CLI, or Terraform.
</Info>

## How to Add Google Compute Engine

<Steps>
  <Step title="Enable the Compute Engine API">
    1. Go to the [Google Cloud Console](https://console.cloud.google.com)
    2. Select your project (or create one) — you will need the **project ID**
    3. Navigate to **APIs & Services → Library**
    4. Search for **Compute Engine API** and click **Enable**
  </Step>

  <Step title="Add to Civic">
    Add the Google Compute Engine server to your Civic environment through the server directory.
  </Step>

  <Step title="Authorize">
    On first use, you will be redirected to Google to authorize the connection.
  </Step>

  <Step title="Test Connection">
    Start with `"List all VMs in us-central1-a"` to verify the connection. You will need to know your GCP project ID — the server cannot discover it.
  </Step>
</Steps>

## What You Can Do

<CardGroup cols={2}>
  <Card title="VM Lifecycle" icon="server">
    Create, start, stop, reset, resize, and delete VM instances
  </Card>

  <Card title="Disk Inspection" icon="hard-drive">
    List disks, view sizes, performance configs, and snapshot history
  </Card>

  <Card title="GPU Discovery" icon="microchip">
    List available GPU and TPU accelerator types per zone
  </Card>

  <Card title="Template & MIG Inspection" icon="clone">
    View instance templates and managed instance group status
  </Card>
</CardGroup>

## Use Cases

### VM Management

* **Create**: `"Create an e2-micro VM called test-vm in us-central1-a using Debian 12"`
* **List**: `"List all VMs in us-central1-a"`
* **Resize**: `"Stop VM my-vm, resize it to n2-standard-8, then start it again"`
* **Delete**: `"Delete all stopped VMs in us-central1-a"`
* **GPU**: `"Create an n1-standard-4 VM with 1 T4 GPU — what maintenance policy should I use?"`

### Infrastructure Inspection

* **Disks**: `"Show me all disks in us-central1-a and their sizes"`
* **Snapshots**: `"List all snapshots in my project and how much storage they're using"`
* **GPUs**: `"What GPUs are available in us-central1-a?"`
* **Templates**: `"What does instance template my-template define — show me the full VM config"`
* **MIGs**: `"Show me all instances in MIG my-mig and their current status"`

***

## Available Tools (25)

### VM Lifecycle (6 write tools)

<AccordionGroup>
  <Accordion title="create_instance">
    `create_instance` — Create a new VM instance. Async — use `get_zone_operation` to track completion.
  </Accordion>

  <Accordion title="delete_instance">
    `delete_instance` — Delete a VM. Disks with `autoDelete: true` (the default) are deleted with the VM.
  </Accordion>

  <Accordion title="start_instance / stop_instance / reset_instance">
    Start, stop, or hard-reset a VM. All async. `reset_instance` is a hard reset, not a graceful reboot.
  </Accordion>

  <Accordion title="set_instance_machine_type">
    `set_instance_machine_type` — Resize a VM to a different machine type. The VM **must be stopped first**.
  </Accordion>
</AccordionGroup>

### VM Inspection

<AccordionGroup>
  <Accordion title="list_instances">
    `list_instances` — List all VMs in a specific zone. Zone is strictly required — no cross-zone queries.
  </Accordion>

  <Accordion title="get_instance_basic_info">
    `get_instance_basic_info` — Get details for a single VM including GPU accelerators.
  </Accordion>

  <Accordion title="list_instance_attached_disks">
    `list_instance_attached_disks` — List all disks attached to a VM with full attachment metadata.
  </Accordion>
</AccordionGroup>

### Disks & Snapshots

<AccordionGroup>
  <Accordion title="list_disks / get_disk_basic_info / get_disk_performance_config">
    Inspect persistent disks — sizes, types, performance settings (IOPS/throughput), and timestamps. Zone-scoped.
  </Accordion>

  <Accordion title="list_snapshots">
    `list_snapshots` — List all disk snapshots in a project. Project-scoped (not zone-scoped).
  </Accordion>
</AccordionGroup>

### Machine Types & GPUs

<AccordionGroup>
  <Accordion title="list_machine_types">
    `list_machine_types` — List all available machine types in a zone. Returns a very large response (\~239KB).
  </Accordion>

  <Accordion title="list_accelerator_types">
    `list_accelerator_types` — List available GPU and TPU types in a zone. Availability varies significantly by zone.
  </Accordion>

  <Accordion title="list_images">
    `list_images` — List available VM images in an image project (Debian, CentOS, etc.).
  </Accordion>
</AccordionGroup>

### Templates & MIGs

<AccordionGroup>
  <Accordion title="list_instance_templates / get_instance_template_basic_info / get_instance_template_properties">
    Inspect instance templates — saved VM configuration blueprints. **Global templates only** — regional templates are not visible.
  </Accordion>

  <Accordion title="list_instance_group_managers / get_instance_group_manager_basic_info / list_managed_instances">
    Inspect managed instance groups and their instances. **Zonal MIGs only** — regional MIGs are not visible.
  </Accordion>
</AccordionGroup>

### Operations & Capacity

<AccordionGroup>
  <Accordion title="get_zone_operation">
    `get_zone_operation` — Track status of async operations. Always check the `error` field, not just `status`.
  </Accordion>

  <Accordion title="list_reservations / list_commitments">
    List capacity reservations and committed use discounts.
  </Accordion>
</AccordionGroup>

***

<Note>
  **Project ID required** — The server cannot discover project IDs. Find yours in the [GCP Console](https://console.cloud.google.com) project picker.

  **Zone-scoped listings** — `list_instances`, `list_disks`, and MIG tools all require a specific zone. No cross-zone queries.

  **e2 instances** — Always specify `maintenancePolicy: MIGRATE` for `e2` instances. The default (`TERMINATE`) causes creation to fail. GPU instances are the opposite — they require `TERMINATE`.

  **Always check operation errors** — Write operations are async. `set_instance_machine_type` on a running VM returns `DONE` with an embedded error — always inspect the `error` field.
</Note>

***

## Guardrails

This server supports all [14 universal guardrails](/civic/concepts/guardrails). Server-specific guardrails are coming soon.

<Tip>
  Configure guardrails via the Civic UI or ask the Configurator Agent: "Add guardrails to my Google Compute Engine server."
</Tip>
