Skip to main content
Glama
sschinna

Google Cloud Batch (HPC) & Compute Engine VM MCP Server

by sschinna

Google Cloud Batch (HPC) & Compute Engine VM MCP Server

A Model Context Protocol (MCP) server that empowers AI assistants (Antigravity CLI, IDEs, Claude, etc.) to manage Google Cloud Batch (HPC / Batch computing workloads) and Google Compute Engine Virtual Machines (VMs) directly through conversational prompts.


Capabilities

1. Google Cloud Batch (HPC Computing)

  • submit_batch_script_job: Submit bash/shell script batch computing jobs (configurable CPU millicores, RAM MiB, task counts, parallelism, and Spot/Preemptible VMs).

  • submit_batch_container_job: Submit containerized batch workloads with Docker/OCI images.

  • list_batch_jobs: List batch jobs in a project/region with current states (QUEUED, RUNNING, SUCCEEDED, FAILED).

  • get_batch_job: Inspect job details, task statuses, failure reasons, and direct Google Cloud Console links.

  • cancel_batch_job: Cancel a running or scheduled batch job.

  • delete_batch_job: Permanently remove a batch job definition.

  • list_batch_tasks: List individual tasks and exit codes inside a job group.

2. Google Compute Engine VM Management

  • create_gcp_vm: Provision new VM instances in Google Cloud Console with customized machine types (e.g. e2-medium, c2-standard-8, a2-highgpu-1g), OS families (Ubuntu, Debian, COS, CentOS), boot disk size/type, startup scripts, network tags, and Spot pricing.

  • list_gcp_vms: List instances across one or all zones with runtime status, machine type, internal IP, and external IP.

  • get_gcp_vm: Retrieve detailed hardware, networking, and disk specifications for an instance.

  • start_gcp_vm: Start a stopped VM instance.

  • stop_gcp_vm: Gracefully stop a running VM instance.

  • reset_gcp_vm: Hard reset a VM.

  • delete_gcp_vm: Terminate and delete a VM instance.

  • get_vm_serial_port_output: Inspect serial console boot logs (crucial for debugging startup scripts and HPC initialization).

3. Diagnostics & Health

  • check_gcp_connection: Verify active GCP credentials, service account email, and default project/region/zone.


Related MCP server: GCP MCP

Authentication Setup

The server automatically detects credentials in the following order:

  1. Environment Variable: GOOGLE_APPLICATION_CREDENTIALS pointing to a Service Account key JSON file.

  2. Local Key File: Place your Google Cloud Service Account JSON file as gcp_credentials.json directly in this folder (C:\Users\banda\gcp-batch-mcp-server\gcp_credentials.json).

  3. Application Default Credentials (ADC): Run gcloud auth application-default login in your terminal.

Required IAM Roles on Google Cloud

Ensure your Service Account or user identity has:

  • Batch Job Administrator (roles/batch.jobsAdmin)

  • Compute Instance Admin (v1) (roles/compute.instanceAdmin.v1)

  • Service Account User (roles/iam.serviceAccountUser)


Configuration (.env)

Copy .env.example to .env and fill in your values:

GCP_PROJECT_ID=your-project-id
GCP_REGION=us-central1
GCP_ZONE=us-central1-a
GOOGLE_APPLICATION_CREDENTIALS=C:\Users\banda\gcp-batch-mcp-server\gcp_credentials.json

Running the Server Standalone

cd C:\Users\banda\gcp-batch-mcp-server
.venv\Scripts\python.exe src\server.py

Running Unit Tests

cd C:\Users\banda\gcp-batch-mcp-server
.venv\Scripts\python.exe -m unittest discover -s tests -p "test_*.py"

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage Google Cloud Dataproc clusters and jobs through a standardized interface. Supports cluster creation/deletion, job submission (Spark, PySpark, Hive, etc.), and serverless batch operations.
    13
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Enables AI assistants to interact with Google Cloud Platform resources through natural language queries. Supports querying and managing GCP services like Compute Engine, Cloud Storage, BigQuery, and more across multiple projects and regions.
    9
    5,594 npm
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables managing Google Cloud Platform infrastructure through natural language, including VM deployment, SSH key management, remote command execution, and Terraform infrastructure-as-code operations.
    2
    -
  • A
    license
    B
    quality
    Not graded
    maintenance
    Enables AI assistants to interact with and manage Google Cloud Platform resources including Artifact Registry, BigQuery, Cloud Build, Compute Engine, Cloud Run, Cloud Storage, and monitoring services through a standardized MCP interface.
    1
    MIT