prime-intellect-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@prime-intellect-mcp Show me available H100 pods under $2/hr"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
prime-intellect-mcp
Let Claude Code rent, drive, and terminate Prime Intellect GPU pods on its own — with hard spend caps you control.
What this is
An MCP server that connects Claude Code (or any MCP client) to your Prime Intellect account. With it, the agent can:
🔍 Find the cheapest GPU pod that matches your requirements
💸 Quote a price before committing money
🛒 Provision the pod (only after you say
confirm=True)🖥️ SSH into it (the connection string is handed to the agent's own
Bashtool)🛑 Terminate it when work is done — and warn loudly if you forget
Built for one workflow: telling Claude "rent the cheapest H100, run my training script, then kill it" and not waking up to a $400 bill.
Related MCP server: claude-colab
Install in 60 seconds
You only need this much to start renting GPUs through Claude Code:
1. Get a Prime Intellect API key
Click here to generate one → set permissions:
Scope | Level |
Instances | Read and write |
Availability | Read only |
Billing | Read only |
SSH Keys | Read only |
Copy the key — it starts with pit_….
2. Add the server to Claude Code
Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or your project's .mcp.json, and paste:
{
"mcpServers": {
"prime-intellect": {
"command": "uvx",
"args": ["prime-intellect-mcp"],
"env": {
"PRIME_API_KEY": "pit_PASTE_YOURS_HERE",
"PRIME_MAX_HOURLY_USD": "5",
"PRIME_MAX_TOTAL_USD": "40"
}
}
}
}That's it. Restart Claude Code and ask: "What GPUs are available right now under $1/hr?"
Don't have
uvx? Install it withcurl -LsSf https://astral.sh/uv/install.sh | sh(orbrew install uv). It's a one-liner installer for theuvpackage manager and you'll never have to manage a virtualenv again.
✨ Add SSH (optional, +2 min) — needed for Claude to actually run code on the pod
The server above can already provision/inspect/terminate pods. But to have Claude Code SSH into a running pod and execute commands on it, Prime Intellect needs to know your machine's public SSH key.
3. Find or generate an SSH key on your machine
ls ~/.ssh/*.pub # if you have id_ed25519.pub or similar, you're set
# otherwise:
ssh-keygen -t ed25519 -C "you@example.com" # press Enter through the prompts4. Register the public key with Prime Intellect
cat ~/.ssh/id_ed25519.pub # or whichever .pub file you haveCopy the output (one line starting with ssh-ed25519 …), then paste it into the Add SSH key form at app.primeintellect.ai/dashboard/ssh-keys.
That's it. Future pods will have your public key in authorized_keys, and Claude Code's Bash tool can SSH straight in:
ssh ubuntu@<pod-ip-from-pod_status> "nvidia-smi"Coming in v0.2: a
register_ssh_keyMCP tool that does step 4 from inside Claude (no browser visit). See the issue tracker to follow along.
What Claude can now do (the 9 tools)
Tool | Use case |
| "What GPU types does Prime Intellect offer?" |
| "Show me 1×H100 pods available under $3/hr." |
| "How much credit do I have left?" |
| "Quote me a 1×A100 with 200GB disk." (no charge) |
| "Provision the pod from that quote." (requires |
| "Show me my running pods." |
| "Is pod X ready? Wait until it has SSH info." |
| "Kill pod X." (requires |
| "Did I forget to terminate anything?" |
Safety: nothing provisions silently
Three layers, in order:
Quote first.
pod_quotereturns a price + a 60-second token. No side effects. The dollar amount is now in the agent's context.Explicit confirm.
pod_create(andpod_terminate) requiresconfirm=True. Without it, you get a dry-run preview.Hard env-var caps.
PRIME_MAX_HOURLY_USDblocks any pod above the rate.PRIME_MAX_TOTAL_USDblocks any (rate × max_lifetime_hours) above the budget. Wallet balance is also enforced. None of these caps can be overridden by tool arguments — they're read at every call.
Defaults: PRIME_MAX_HOURLY_USD=5, PRIME_MAX_TOTAL_USD=40. Set them in your config's env block.
Every pod_create / pod_terminate is appended as JSON to ~/.prime-intellect-mcp/audit.log, so you have a complete history of what the agent did with your money.
Example prompts (paste these into Claude Code)
List the cheapest 1×H100 pods available right now. Show me the top 3 by hourly price.Quote a 1×A100 80GB with 100GB disk, 8 vCPU, 64GB RAM. Don't provision yet —
just show me what it would cost.I need to fine-tune a 7B model overnight. Find the cheapest 1×H100 with 200GB
disk, max $40 total budget, max 12 hours. Provision it, give me the SSH command,
and remind me to terminate when I'm done.Check if I have any running pods I forgot about and show me their hourly cost.Terminate pod abc123. Confirm before doing it.Troubleshooting
Either your Claude Code config didn't pick up the env block, or you typed PRIME_API_KEY as a different variable. Verify with:
$ env | grep PRIMEinside the same shell that launches Claude Code, or paste the key directly into the JSON env block (instead of using ${PRIME_API_KEY}).
The agent picked a pod above your hard cap. Either:
Pick a cheaper GPU (
list_availabilitywith a region filter often surfaces cheaper community-priced rows), orRaise
PRIME_MAX_HOURLY_USDin your config and restart Claude Code.
Quotes live 60 seconds; the agent waited too long between pod_quote and pod_create. Just call pod_quote again — it's a no-op cost-wise.
Provisioning isn't fully done. The pod is alive but still running its install script. Call pod_status(pod_id, wait_for_ssh=True) and it will block (polling every 5s) until SSH comes up.
You haven't told Prime Intellect about your public key (or the pod was provisioned before you registered it). Fix:
Verify your pubkey is registered at app.primeintellect.ai/dashboard/ssh-keys.
Re-provision — the pod's
authorized_keysis set at create time, so existing pods won't pick up keys you registered after.If your private key has a passphrase, run
ssh-add --apple-use-keychain ~/.ssh/your_keyonce on macOS so the agent unlocks it silently from now on.
Top up at app.primeintellect.ai/wallet and try again.
Why another one?
There's a prime-mcp-server 0.1.2 on PyPI. It's a thin proof-of-concept; this isn't a fork. Differences for unattended overnight use:
|
| |
Two-step quote → confirm | ✅ | ❌ |
Env-var hard spend caps | ✅ | ❌ |
Wallet pre-check | ✅ | ❌ |
Runaway-pod detection | ✅ | ❌ |
SSH handoff to agent | ✅ | ❌ |
Tests | 32 unit + opt-in live | None |
Local development
git clone https://github.com/kvrancic/prime-intellect-mcp
cd prime-intellect-mcp
uv sync
uv run pytest -m "not live" # 32 fast tests, no network, no spend
uv run ruff check .
uv run mypy srcLive smoke test (provisions cheapest available GPU, runs nvidia-smi, terminates; ~$0.05 spend):
PRIME_API_KEY=pit_... PRIME_LIVE_TEST=1 PRIME_LIVE_MAX_HOURLY=0.60 \
PRIME_MAX_HOURLY_USD=0.60 PRIME_MAX_TOTAL_USD=2.00 \
uv run pytest tests/test_smoke_live.py -v -sRoadmap
v0.2 —
register_ssh_keyMCP tool (kill the dashboard step), Sandboxes (prime-sandboxesSDK), Environments Hubv0.3 — Optional auto-terminate daemon (server-side enforcement of
max_lifetime_hours); cost telemetryv1.0+ — Hosted/OAuth deployment when Prime Intellect ships OAuth; submission to Anthropic connector directory
Acknowledgements
Prime Intellect for the
primePython SDK that does 90% of the workMIT 6.8610 (Advanced NLP) for the Prime Intellect credits that made testing this possible
FastMCP for the framework
License
MIT — see LICENSE.
Contributing
Issues and PRs welcome. Please run uv run pytest -m "not live" and uv run ruff check . before submitting.
Available Tools
9 toolsget_wallet_balanceA
Return the current Prime Intellect wallet balance and recent billings.
Use this to estimate how long a quoted pod can run, or to check why pod_create returned an insufficient-funds error.
Inputs: no named parameters. Returns: object
list_availabilityA
List currently-available GPU pods that match the filters.
Returns the SDK's GPUAvailability rows (cloud_id, gpu_type, gpu_count, prices, disk/vcpu/memory bounds, stock_status, ...). Use this to pick a target before pod_quote, or to show the user options.
Inputs: gpu_type, gpu_count, regions. Returns: object
list_gpu_typesA
List every GPU type Prime Intellect currently offers (e.g. "H100_80GB", "A100_80GB").
Use this when the user is vague about what they want. Pass the result into list_availability or pod_quote.
Inputs: no named parameters. Returns: result
pod_check_runawayA
Return locally-tracked pods that have run past max_lifetime_hours OR whose accumulated cost is approaching PRIME_MAX_TOTAL_USD.
Call this at the start of long-running sessions to catch forgotten pods.
Inputs: no named parameters. Returns: result
pod_createA
Provision a Prime Intellect GPU pod (or preview the provisioning).
With confirm=False: returns a dry-run preview describing what would happen. With confirm=True: validates spend caps + quote freshness, then provisions.
The server enforces:
quote_token must be fresh (TTL 60s)
hourly_usd ≤ PRIME_MAX_HOURLY_USD
hourly_usd × max_lifetime_hours ≤ PRIME_MAX_TOTAL_USD
estimated total ≤ wallet balance
On success, the pod is recorded in local state.json so pod_check_runaway can warn about overdue pods later.
Inputs: quote_token (required), name (required), max_lifetime_hours, confirm, +1 more. Returns: object
pod_listA
List every pod the API key can see (active + provisioning + stopped).
Inputs: no named parameters. Returns: result
pod_quoteA
Get a non-binding price quote + reserved provisioning payload.
Returns a quote_token (TTL=60s) that you pass to pod_create with confirm=True to actually provision. This tool has NO side effects.
The server picks the cheapest matching GPUAvailability row that satisfies the requested disk/vcpu/memory. If none matches, returns an error explaining what's available.
Inputs: gpu_type (required), gpu_count, disk_size_gb, vcpus, +2 more. Returns: object
pod_statusA
Get the current status (provisioning / active / failed) for a pod.
With wait_for_ssh=True, blocks (polls every 5s) until ssh_connection is
available — that's when you can SSH in. Returns the SSH connection string
in ssh_connection (e.g. "root@1.2.3.4 -p 22000"). Use it from your Bash
tool: ssh -o StrictHostKeyChecking=no <ssh_connection> "<cmd>".
Inputs: pod_id (required), wait_for_ssh, timeout_s. Returns: object
pod_terminateA
Destroy (terminate) a pod. Idempotent on already-deleted pods.
Without confirm=True, returns a no-op preview so you can re-read your decision.
Inputs: pod_id (required), confirm. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a unique and clearly distinct purpose, from wallet balance and GPU availability listing to pod creation, quoting, and termination. There is no overlap that could cause an agent to select the wrong tool.
Tool names follow a consistent pattern: utility functions use verb_noun (e.g., get_wallet_balance, list_availability) and pod operations all start with pod_ (e.g., pod_create, pod_terminate). The naming is predictable and easily understood.
With 9 tools covering wallet, GPU types, availability, pod lifecycle (create, list, status, quote, terminate), and runaway monitoring, the count is well-scoped for the server's purpose. Each tool earns its place with no redundancy.
The tool surface covers the full lifecycle of GPU pod management: discovering availability, quoting, creating, monitoring status, listing, terminating, and checking for runaway pods. The inclusion of wallet balance and wait-for-SSH functionality addresses common operational needs.
Maintenance
Related MCP Connectors
Rent GPUs at live prices and serve any Hugging Face model, with spend caps for AI agents.
AI cloud for agents: launch GPUs, run jobs that stop their own billing, schedule runs.
Rent cloud GPUs from AI agents: live prices, VRAM estimates, launch, logs and stop.
Rent A100 and H100 GPUs by the minute from your agent, within a spending limit you set.
Related MCP Servers
- AlicenseAqualityFmaintenanceA server that allows LLMs to run Claude Code with all permissions bypassed automatically, enabling code execution and file editing without permission interruptions.1793 npm1,315MIT
- AlicenseNot gradedqualityFmaintenanceEnables Claude Code to execute shell commands, Python code, and file transfers on a Google Colab T4 GPU via an MCP server, bridging the GPU gap for AI coding agents.6MIT
- AlicenseAqualityDmaintenanceThis MCP server enables remote control and management of Claude Code agents, allowing you to execute missions, configure agent personalities, and integrate with other MCP tools.715 npm1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that lets any MCP-capable agent spawn and drive Claude Code sessions — effectively turning Claude Code into an orchestratable sub-agent fleet.107 npmMIT