Runcrate MCP 伺服器如何讓 Claude Code、Codex 和 Cursor 使用 GPU 並受預算限制
Give your coding agent a GPU, and a budget: the Runcrate MCP server in Claude Code, Codex and Cursor
Runcrate 示範如何把 Runcrate MCP 伺服器連接至 Claude Code、Codex、Cursor 等編碼智能體,讓它們建立 GPU 執行環境、執行命令及管理工作。
Coding agents are good at writing a training script. They are bad at the part that comes next: finding a GPU, getting a shell on it, running the script, and remembering to shut the machine down. That last step is where the surprise invoices come from.
This post shows how to hand that whole loop to the agent you already use (Claude Code, Codex, Cursor or any MCP client) with the Runcrate MCP server, and how to keep it on a leash while it spends money.
What the agent gets
The server lives at https://mcp.runcrate.ai/mcp (Streamable HTTP). It exposes tools for:
- GPU instances: list GPU types with live prices, create an instance, check its status, run shell commands on it over SSH, upload and download files, delete it.
- Jobs: run one command on a fresh GPU machine that stops itself, and its billing, when the command exits. The agent follows the logs and reads the exit code and cost.
- Schedules: start an instance or a job later, once or on a cron.
- Storage volumes, SSH keys, firewall rules and HTTPS links for a port on an instance.
- Billing: balance, usage, and the monthly budget of the environment it works in.
Sign-in is OAuth in your browser. There is no API key to paste into a config file.
Connect it
Claude Code
claude mcp add --transport http --scope user runcrate https://mcp.runcrate.ai/mcp
Then run /mcp inside Claude Code and pick runcrate. Your browser opens to sign in.
Codex
codex mcp add runcrate --url https://mcp.runcrate.ai/mcp
Cursor (~/.cursor/mcp.json), and most other clients:
{ "mcpServers": { "runcrate": { "url": "https://mcp.runcrate.ai/mcp" } } }
VS Code (mcp.json in your user profile):
{ "servers": { "runcrate": { "type": "http", "url": "https://mcp.runcrate.ai/mcp" } } }
If you have the Runcrate CLI (brew install aeonmindai/tap/runcrate), runcrate mcp install finds the clients on your machine and connects them all.
The leash: one environment, one budget
When you sign in, you pick a workspace and one environment. The agent can act only inside that environment, and the environment's monthly budget caps what it can spend. No MCP tool can create or switch environments or change a budget, so the agent cannot raise its own ceiling. Budgets are set in the dashboard by a workspace owner or admin.
Two more guardrails sit on every instance the agent creates:
-
max_runtime_minutes(5 minutes to 7 days): the instance is terminated that long after it starts running, with an alert 10 minutes before. -
idle_shutdown_minutes(5 minutes to 24 hours): the instance is terminated once GPU utilization stays under 5% with nobody connected for that long.
You do not need to know the parameter names. Say it in the prompt:
Launch an H100, stop it after 4 hours or after 30 idle minutes.
Three prompts that work
Check the hardware before you commit
What GPUs with at least 48 GB of VRAM are available right now, and what do they cost per hour?
The agent calls list_gpu_types and answers from live prices.
Run a training script and come back with the number
Run python train.py on an A4000 for at most 2 hours with my volume training-data, then tell me the final loss.
What happens under the hood:
-
list_volumesfinds the id oftraining-data. -
run_jobstarts the command withgpu: "A4000",max_runtime_minutes: 120and the volume attached at/workspace. -
get_job_logsfollows the output until the job is done, and the agent reads the loss from it. -
get_jobreturns the final status, exit code and cost.
The machine stops when the script exits, so there is nothing left running to forget about.
Keep a box for interactive work
Launch an RTX 4090, install vllm, serve Qwen/Qwen2.5-7B-Instruct on port 8000, and give me an HTTPS link only my workspace can open. Stop it after 3 hours.
Here the agent uses create_instance with a max runtime, ssh_execute to install and start the server, and create_instance_link to expose port 8000 at an https://8000-<instance>.runcrate.app address.
Prices, so you know what you are asking for
From the live pricing endpoint on 2026-10-20: RTX 4090 from $0.52/hr, A100 80GB from $1.76/hr, H100 from $3.55/hr, H200 from $4.24/hr. Booting is never billed, and the balance is prepaid, so there is no monthly fee. The current numbers are at runcrate.ai/pricing.
Not every task needs a GPU of its own
If the agent only needs a model, not a machine, the same account has 200+ open models behind an OpenAI-compatible API. The client you already use works:
from openai import OpenAI
client = OpenAI(base_url="https://api.runcrate.ai/v1", api_key="rc_live_...")
r = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V3",
messages=[{"role": "user", "content": "Summarize this stack trace: ..."}],
)
print(r.choices[0].message.content)
Links
- MCP setup for every client: runcrate.ai/docs/mcp/setup
- Full tool reference: runcrate.ai/docs/mcp/tools
- Source and client configs: github.com/aeonmindai/runcrate-mcp
If you wire this into an agent workflow, I would like to hear what broke first. Reply here or write to hello@runcrate.ai.
來源:DEV Community · dev.to