CloudGPU MCP

io.github.mrhy7176由 GitHub 帳號 mrhy7176 發布v0.4.0更新於 Nov 7, 2026

Rent a per-minute GPU from your MCP client, run a job, download results, shut it down.

概覽

AI 產生的概覽

讓助理依分鐘租用雲端 GPU、執行工作、下載結果並關機,全部在 MCP 用戶端內完成。

可以做什麼
  • 查詢帳戶餘額、各 GPU 型號的即時每小時價格與可用性,以及現成映像
  • 取得指定 GPU 與時數的費用報價,再依預算、時限與閒置上限租用執行個體
  • 在執行個體上執行指令、追蹤日誌,並透過 SFTP 上傳或下載檔案與資料夾
  • 查看執行個體狀態、已執行分鐘數與目前費用,然後銷毀執行個體以停止計費
  • 執行會自動開機並銷毀 GPU 的單一指令工作,並列出或取消這些工作
  • 列出相容 OpenAI 的模型 API 上的模型,無需租用 GPU 即可推論
適用情境
適合讓助理端到端處理短時間的 GPU 工作,例如微調模型、執行批次作業,或使用 JupyterLab、ComfyUI 等現成映像,而不必自行管理伺服器。也適合希望在租用前先取得報價並受支出上限約束的情境。
執行需求
透過 npx 執行的本機 stdio 伺服器,需要 Node.js 18 或更新版本。需要在 CLOUDGPU_API_KEY 環境變數中提供 CloudGPU API 金鑰,或透過瀏覽器 connect_account 流程取得金鑰,且帳戶需有預付餘額。需要能連線至 CloudGPU API 的網路。
安裝前請注意
租用會從預付餘額實際扣款;執行個體依分鐘計費,餘額用盡時執行中的執行個體會被銷毀且磁碟被清空,因此應隨時下載結果。API 金鑰具備消費能力,透過 connect_account 取得的金鑰帶有支出上限、GPU 數量與到期日,不再需要時應予撤銷。上傳 .ssh、.env 或金鑰檔等敏感路徑需要明確開啟 allow_sensitive。選用環境變數可限制助理可設定的預算與時數,唯讀模式僅註冊查詢類工具。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 CloudGPU MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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
bash
claude mcp add cloudgpu --env CLOUDGPU_API_KEY=cgw-sk-... -- npx -y cloudgpu-mcp
Cursor (~/.cursor/mcp.json or .cursor/mcp.json)
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)
json
{  "mcpServers": {    "cloudgpu": {      "command": "npx",      "args": ["-y", "cloudgpu-mcp"],      "env": { "CLOUDGPU_API_KEY": "cgw-sk-..." }    }  }}
opencode (opencode.json)
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)
yaml
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.

Agent Skill

The same guidance is available as two Agent Skills:

  • skills/cloudgpu/SKILL.md: renting and using a GPU. Claude Code loads it on demand when you ask for a GPU job. It expects the cloudgpu MCP tools to be installed (see above).

  • skills/cloudgpu-model-api/SKILL.md: calling the OpenAI-compatible model API at https://cloudgpu.app/v1 without renting a GPU. It works with the MCP tools or with just a CLOUDGPU_API_KEY.

  • Claude plugin: both skills are included automatically when you install the CloudGPU Claude plugin from this repo's marketplace:

    /plugin marketplace add mrhy7176/cloudgpu-mcp/plugin install cloudgpu@cloudgpu
  • Claude Code, personal install: copy skills/cloudgpu/ and skills/cloudgpu-model-api/ to ~/.claude/skills/.

  • Claude Code, project install: copy skills/cloudgpu/ and skills/cloudgpu-model-api/ to .claude/skills/ in your project.

  • Cursor, Codex, Cline, Amp and other agents that read Agent Skills: install both skills with the skills CLI:

    npx skills add mrhy7176/cloudgpu-mcp

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
run_jobStarts a GPU, runs one command and destroys the GPU, all on CloudGPU's servers; safe to retry with the same idempotency_key
get_job / list_jobsJob status, exit code, cost, the last ~4 KB of output and the job's history
cancel_jobStops a job and destroys its GPU
connect_account / finish_connectGets a key without copying one: the user approves this assistant in the browser with a spending limit and a number of GPUs at once

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.
  • Jobs are not started twice. run_job sends an Idempotency-Key. Resending the same job returns the same job instead of starting a second GPU, and the server refuses the same key with different parameters.
  • Keys with a budget. A key from connect_account has a total spending limit, a number of GPUs it may run at once and an expiry date, all enforced by CloudGPU's servers. Revoke it at https://cloudgpu.app/api and it can no longer start anything.
  • Read-only mode. CLOUDGPU_READ_ONLY=1 registers only the look-up tools.

Configuration

EnvDefault
CLOUDGPU_API_KEY(or connect_account)From https://cloudgpu.app/api. Without it, a key saved by finish_connect in ~/.config/cloudgpu/credentials.json is used
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:

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

Command-line tool

The package also installs a cloudgpu command for using the same API from a terminal (Node.js 18.3 or newer, no extra dependencies):

bash
npm install -g cloudgpu-mcp      # or run it once with: npx -p cloudgpu-mcp cloudgpu --helpcloudgpu login                   # saves your key to ~/.config/cloudgpu/config.json (mode 0600)cloudgpu offers                  # GPU models with live price and availabilitycloudgpu up --gpu "RTX 4090" --template comfyui --max-minutes 120 --max-spend 5 --waitcloudgpu ssh <id>                # opens your system ssh to the instancecloudgpu down <id>               # destroys it and stops billing (asks first; --yes to skip)
CommandWhat it does
loginSave an API key (input hidden, or piped on stdin); checked against the API first
offers [--template ID]GPU models, VRAM, live price per GPU-hour, availability
templatesReady-made images and the GPU each recommends
up --gpu MODEL [--template ID] [--count N] [--max-minutes N] [--max-spend USD] [--idle-minutes N] [--setup FILE] [--wait]Rent an instance; --setup runs a bash script once as root after hand-over (log in /root/cloudgpu-setup.log); --wait polls until it is running or failed, then prints the SSH command and URL
ls / status <id>Instances with status, minutes run and cost so far
ssh <id> [-- ARGS]Run ssh with the instance's host, port and user; --show-password prints the password if there is one
down <id> [--yes]Destroy the instance; its disk is erased, so download results first
balanceBalance and how many instances the account may run

CLOUDGPU_API_KEY takes precedence over the saved key, and CLOUDGPU_BASE_URL overrides the API host. Read commands accept --json; SSH passwords are left out of JSON unless you pass --show-password. Every command has --help. Errors print the API's message and exit non-zero (2 for usage errors).

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

bash
npm installnpm testnode src/index.js   # stdio server; set CLOUDGPU_API_KEY firstnode src/cli.js --help

License

MIT, see LICENSE.

來源:README.md,提交 0e15240

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

5
  1. v0.4.0最新Nov 7, 2026
  2. v0.3.0Nov 3, 2026
  3. v0.2.0Nov 3, 2026
  4. v0.1.1Oct 31, 2026
  5. v0.1.0Oct 29, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分