
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.
概览
让助手按分钟租用云端 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 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 CloudGPU MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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
- Create an API key at cloudgpu.app/api and add a prepaid balance (card or USDT).
- 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
Cursor (~/.cursor/mcp.json or .cursor/mcp.json)
Cline (MCP Servers → Configure MCP Servers → cline_mcp_settings.json)
opencode (opencode.json)
goose (~/.config/goose/config.yaml, or goose configure → Add Extension → Command-line Extension)
- Optional but recommended: copy
rules/cloudgpu.mdinto your project asAGENTS.md,.cursor/rules/cloudgpu.mdor.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 resourcecloudgpu://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 thecloudgpuMCP tools to be installed (see above). -
skills/cloudgpu-model-api/SKILL.md: calling the OpenAI-compatible model API athttps://cloudgpu.app/v1without renting a GPU. It works with the MCP tools or with just aCLOUDGPU_API_KEY. -
Claude plugin: both skills are included automatically when you install the CloudGPU Claude plugin from this repo's marketplace:
-
Claude Code, personal install: copy
skills/cloudgpu/andskills/cloudgpu-model-api/to~/.claude/skills/. -
Claude Code, project install: copy
skills/cloudgpu/andskills/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:
Tools
The server also provides a train_on_cloudgpu prompt.
Guardrails
- A quote first.
create_instanceonly takes aquote_idfromestimate_costanduser_confirmed=true. - Server-side limits. Every instance is created with
max_spend_usd,max_hoursand 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_USDandCLOUDGPU_MAX_HOURScap what the agent may set. - Results before shutdown. After commands have run,
stop_instancerefuses until something has been downloaded, unless the user confirmsforce=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 needsallow_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_jobsends anIdempotency-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_accounthas 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=1registers only the look-up tools.
Configuration
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:
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):
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
- MCP docs: https://cloudgpu.app/docs/mcp
- GPU pricing: https://cloudgpu.app/pricing
- Model API and prices: https://cloudgpu.app/api
- API reference: https://cloudgpu.app/api/docs · OpenAPI: https://cloudgpu.app/openapi.json · For LLMs: https://cloudgpu.app/llms.txt
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
License
MIT, see LICENSE.
来源:README.md,提交 0e15240
工具
0版本历史
5- v0.4.0最新Nov 7, 2026
- v0.3.0Nov 3, 2026
- v0.2.0Nov 3, 2026
- v0.1.1Oct 31, 2026
- v0.1.0Oct 29, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分