mcpField
C
CloudGPU MCP

CloudGPU MCP

Local
cloudgpu.appCloud & Infra0Updated 1d ago

About CloudGPU MCP

CloudGPU MCP is a local MCP server for agents that need rented GPU compute for jobs such as model training. It supports cost quotes, job execution, file transfer, and shutdown, and also lists models available through CloudGPU’s OpenAI-compatible API.

Key features

  1. 01Live GPU pricing and cost estimates
  2. 02GPU instance creation with spending limits
  3. 03Remote command execution and log checks
  4. 04File upload and download
  5. 05Instance status and shutdown
  6. 06OpenAI-compatible model listing

Use cases

  1. 01Estimate GPU costs before renting
  2. 02Run training jobs and retrieve outputs
  3. 03Run inference through the hosted model API

MCP support

Exposes GPU rental, job execution, file transfer, account lookup, and model-listing tools to MCP clients, plus a training prompt and rules resource. It requires a local stdio MCP client.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"mrhy7176-cloudgpu": {
"command": "npx",
"args": [
"-y",
"cloudgpu-mcp"
],
"env": {
"CLOUDGPU_API_KEY": "<CLOUDGPU_API_KEY>"
}
}
}
}
Run commandnpx -y cloudgpu-mcp
Environment variables to set
CLOUDGPU_API_KEYSecretCloudGPU API key (starts with cgw-sk-). Create one at https://cloudgpu.app/api

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcloudgpu-mcp0.1.0

Tools

13

Saved tool list · updated 2d ago

This tool takes no parameters.

Details

From the project README

CloudGPU MCP

CloudGPU MCP server: let an AI agent rent a GPU by the minute, run a job, bring the results back and shut the GPU down. The same API key and balance also cover CloudGPU's OpenAI-compatible model API, so an agent can call a hosted model without renting anything.

"Fine-tune a 7B base model with LoRA on data/train.jsonl and put the adapter in ./outputs."

The agent checks live prices and quotes you, rents the GPU once you say yes, uploads your code and data, starts training in the background, watches the logs, downloads the adapter and destroys the instance. You get the files and the final cost.

It is a local (stdio) MCP server. It works with any MCP client that can start one: Claude Code, Cursor, Cline, opencode, goose, VS Code, Windsurf and others.

Install

  1. Create an API key at cloudgpu.app/api and add a prepaid balance (card or USDT).
  2. Add the server to your client. Node.js 18 or newer is required. The key goes in the environment variable CLOUDGPU_API_KEY.
Claude Code
claude mcp add cloudgpu --env CLOUDGPU_API_KEY=cgw-sk-... -- npx -y cloudgpu-mcp
Cursor (~/.cursor/mcp.json or .cursor/mcp.json)
{
  "mcpServers": {
    "cloudgpu": {
      "command": "npx",
      "args": ["-y", "cloudgpu-mcp"],
      "env": { "CLOUDGPU_API_KEY": "cgw-sk-..." }
    }
  }
}
Cline (MCP Servers → Configure MCP Servers → cline_mcp_settings.json)
{
  "mcpServers": {
    "cloudgpu": {
      "command": "npx",
      "args": ["-y", "cloudgpu-mcp"],
      "env": { "CLOUDGPU_API_KEY": "cgw-sk-..." }
    }
  }
}
opencode (opencode.json)
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "cloudgpu": {
      "type": "local",
      "command": ["npx", "-y", "cloudgpu-mcp"],
      "environment": { "CLOUDGPU_API_KEY": "cgw-sk-..." },
      "enabled": true
    }
  }
}
goose (~/.config/goose/config.yaml, or goose configure → Add Extension → Command-line Extension)
extensions:
  cloudgpu:
    name: cloudgpu
    type: stdio
    cmd: npx
    args: ["-y", "cloudgpu-mcp"]
    envs:
      CLOUDGPU_API_KEY: "cgw-sk-..."
    enabled: true
    timeout: 300
  1. Optional but recommended: copy rules/cloudgpu.md into your project as AGENTS.md, .cursor/rules/cloudgpu.md or .clinerules/cloudgpu.md. It tells the agent to quote before renting, download before shutting down, and never leave a GPU running. The server also exposes the same text as the resource cloudgpu://rules.

To check the install, ask your agent: "List the GPUs available, then estimate the cost for a 24 GB GPU for one hour. Do not create anything." You should see list_gpus and estimate_cost calls and a quote, and nothing is rented.

Tools

ToolWhat it does
get_accountBalance, and how many instances the account may run at once
list_gpusGPU models with VRAM, live price per GPU-hour and availability
list_templatesReady-made images: JupyterLab, Ollama, ComfyUI, LLaMA-Factory, …
estimate_costLive quote for a GPU and a number of hours, plus your balance afterwards; returns a quote_id
create_instanceRents from an approved quote, with a budget, a time limit and an idle limit
get_status / list_instancesStatus, minutes run, cost so far, auto-shutdown limits
run_commandRuns a command on the instance; background=true for long jobs
tail_logsLatest log lines, whether the job finished, GPU utilisation
upload / downloadFiles and folders between your computer and the instance (SFTP)
stop_instanceDestroys the instance and stops billing
list_modelsModels on the OpenAI-compatible API, for inference without renting a GPU

The server also provides a train_on_cloudgpu prompt.

Guardrails

  • A quote first. create_instance only takes a quote_id from estimate_cost and user_confirmed=true.
  • Server-side limits. Every instance is created with max_spend_usd, max_hours and an idle limit (60 minutes by default). CloudGPU's servers check them and destroy the instance when one is hit, even if your client has disconnected or your laptop is asleep.
  • Your own ceiling. CLOUDGPU_MAX_SPEND_USD and CLOUDGPU_MAX_HOURS cap what the agent may set.
  • Results before shutdown. After commands have run, stop_instance refuses until something has been downloaded, unless the user confirms force=true.
  • Secrets stay out of the chat. The instance's SSH login is used inside this process and never returned to the model. Tool output is scrubbed of the API key and login details. Uploading .ssh, .env, key files or your whole home directory needs allow_sensitive=true.
  • The instance stays manageable. Commands that change the root password, SSH configuration, firewall or the platform's monitoring agent are refused. CloudGPU shuts down instances that it can no longer monitor.
  • Read-only mode. CLOUDGPU_READ_ONLY=1 registers only the look-up tools.

Configuration

EnvDefault
CLOUDGPU_API_KEY(required)From https://cloudgpu.app/api
CLOUDGPU_MAX_SPEND_USD50Highest budget the agent may set for one instance
CLOUDGPU_MAX_HOURS24Longest time limit the agent may set
CLOUDGPU_READ_ONLYoff1 = look-up tools only
CLOUDGPU_BASE_URLhttps://cloudgpu.appOverride the API host

Model API on the same balance

The key also works with the OpenAI-compatible API at https://cloudgpu.app/v1. Call list_models (or GET /v1/models) to see the available model IDs. Model prices are on cloudgpu.app/api.

Without MCP

The server wraps CloudGPU's public REST API, which any agent or script can call with the same key:

curl https://cloudgpu.app/v1/gpu/offers -H "Authorization: Bearer $CLOUDGPU_API_KEY"

Links

CloudGPU here means cloudgpu.app. Prepaid balance, billed per minute; when the balance runs out, running instances are destroyed and their disks erased, so keep enough balance for the job and download results as you go.

Development

npm install
npm test
node src/index.js   # stdio server; set CLOUDGPU_API_KEY first

License

MIT, see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.