Use Green Compute from AI assistants (MCP)

Green Compute is an MCP server, so an assistant such as Claude can find a free GPU, rent it, check on it and stop it for you, without you writing any integration code.

Addresshttps://api.green-compute.com/mcp
TransportStreamable HTTP (JSON replies, no event stream)
AuthenticationYour API key, as Authorization: Bearer <key>

Connect

Claude Code:

claude mcp add --transport http green-compute https://api.green-compute.com/mcp \
  --header "Authorization: Bearer $GC_KEY"

Other clients that support remote MCP servers over HTTP with a custom header: give them the address above and the Authorization header. Where to put them depends on the client.

Give the assistant its own key

The assistant can rent machines, which spends your credit. Create a key just for it under Settings or with POST /platform/api-keys:

  • scopes read and rentals: it can see and manage rentals, but can't top up, fetch payment details or make keys;
  • a daily_spend_limit_usd and max_active_rentals, so a mistake can't run up a large bill.

Each tool does what the matching REST call does, with the same checks: a key without the rentals scope can look but not rent.

Tools

ToolDoes
list_gpusGPU models for rent: free now, the most free on one machine, VRAM and price per GPU-hour.
get_balanceYour balance, what everything running costs per hour, and how many hours that lasts.
list_rentalsYour rentals and private models; by default those running, starting or paused.
get_rentalOne rental's state and, once it's ready, its SSH command and host keys.
rent_gpuStart a rental. Give it your SSH public key; optionally a GPU model and count, image, name, start command, restart policy, environment, maximum runtime and an idempotency key.
stop_rentalStop a rental for good: billing stops and its disk is deleted.
rental_logsThe last lines of a running rental's start command log and container output.
run_commandRun a shell command in a running rental, as root, and get its exit code and output (waits up to 120 s).
rental_statsLive CPU, memory, disk and per-GPU use, temperature, power and clocks.
recent_eventsWhat changed since a cursor: ready, failed, paused, ended, balance low, GPUs free. See Events and webhooks.
alert_when_freeBe emailed once when GPUs of a model are free.

Good to know

  • Errors come back as tool results with the API's error object (code, message, retryable; see Errors). no_capacity means nothing is free right now: retry later, or use alert_when_free.
  • A private SSH key is never returned through MCP, because it would end up in the assistant's context. Pass your own public key to rent_gpu.
  • Up to 120 MCP requests a minute per key.
  • Asking the assistant to "rent a 4090, run my script, and stop it when it's done" works best with command and max_runtime_minutes on rent_gpu, so the job runs and stops even if the conversation ends.