Use ComputeNexa from your AI assistant
Your AI assistant (Claude Code, Claude Desktop, Cursor, VS Code and others that support MCP, the Model Context Protocol) can find, launch, connect to and stop your GPUs for you. It shows you the price before anything is charged, and spends nothing until you agree.
What you need
- A ComputeNexa account with credits on your team's balance (see Getting started).
- To be an owner or admin of your team, to create an API key. Members ask one of them.
- An AI assistant that supports MCP. The steps below cover Claude Code, Claude Desktop, Cursor and VS Code.
- About five minutes.
1. Create an API key
- In the dashboard, open API keys in the sidebar.
- Name the key after where you'll use it, e.g. "Claude on my laptop".
- Under What it can do, choose:
- Look only if you just want answers: prices, your machines, spending.
- Launch and stop machines too if the assistant should launch, extend and stop machines for you.
- Click Create key and copy it. It starts with
cnxk_and is shown only once.
The key acts as you and spends your team's credits. Keep it like a password: never paste it into a chat, a document or a repository. More in Use the API.
2. Install uv
uv is a free tool that downloads and runs the ComputeNexa server for your assistant. Install it once, in a terminal:
# macOS or Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# or on macOS with Homebrew
brew install uv
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Open a new terminal and check it: uvx --version prints a version number. More: installing uv.
3. Add ComputeNexa to your assistant
Pick your assistant. In each, replace cnxk_... with your key.
Claude Code
In a terminal:
claude mcp add --env CNX_API_KEY=cnxk_... --transport stdio computenexa -- uvx computenexa-mcpAdd --scope user after add to use it in every project. Then start claude.
Claude Desktop
- Open the Claude menu in your computer's menu bar (not the settings inside a chat) and choose Settings…
- Open Developer in the left sidebar and click Edit Config. This opens
claude_desktop_config.json. - Paste this in. If the file already has an
mcpServerssection, add thecomputenexaentry inside it instead.{ "mcpServers": { "computenexa": { "command": "uvx", "args": ["computenexa-mcp"], "env": { "CNX_API_KEY": "cnxk_..." } } } } - Save the file, then quit Claude Desktop completely and open it again.
- To check: click + at the bottom left of the message box, then Connectors. ComputeNexa should be listed with its tools.
Cursor
Put the same mcpServers entry as Claude Desktop in ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project), then restart Cursor.
VS Code
Create .vscode/mcp.json in your project with the following. VS Code asks for the key the first time and keeps it out of the file, so the file is safe to share.
{
"inputs": [
{ "type": "promptString", "id": "cnx-key", "description": "ComputeNexa API key", "password": true }
],
"servers": {
"computenexa": {
"type": "stdio",
"command": "uvx",
"args": ["computenexa-mcp"],
"env": { "CNX_API_KEY": "${input:cnx-key}" }
}
}
}4. Try it
First, check it's connected. Ask:
Who am I on ComputeNexa?It answers with your email, team, balance and what the key may do. Your assistant may ask you to allow the tool the first time; allow it. Then try a whole session:
You: Which GPUs with at least 48 GB are in stock, and what do they cost?
Assistant: NVIDIA RTX A6000 (48 GB), $0.72 an hour · NVIDIA L40S (48 GB) … · NVIDIA H100 (80 GB) …
You: Launch the cheapest one with Data Science for one hour.
Assistant: NVIDIA RTX A6000 with Data Science for 1 h: $0.72 charged now; unused time is
refunded if it stops early. Shall I launch it?
You: Yes.
Assistant: Launched cnx-7f3a9c. It's starting; I'll tell you when it's ready.
It's running. Connect with: ssh cnx-7f3a9c@ssh.computenexa.com · JupyterLab: https://…
You: Stop it.
Assistant: Stopped cnx-7f3a9c. $0.41 of unused time was refunded.Prices and names above are examples; you'll see live ones. Other things to ask: "What did we spend on GPUs this month?", "Add an hour to my machine", "Keep my voice machine running for a week", "Create an endpoint called Acme Bank".
5. What happens when it spends money
- You always see the price first. Before a launch, an extension or Keep running, the assistant gets a quote and shows it to you. Nothing is charged until you agree and it asks again with that exact total. If the price changed in between, it gets a new quote instead.
- A limit per request: anything costing more than $25 in one go is refused, including each Keep running renewal. To change it, add
CNX_MCP_MAX_LAUNCH_USDnext to your key, in dollars, e.g."CNX_MCP_MAX_LAUNCH_USD": "50"in theenvsection (Claude Code: add--env CNX_MCP_MAX_LAUNCH_USD=50). - A Look only key can't spend at all: the launch and stop tools don't appear.
- Your team's GPU limit and prepaid balance apply, as everywhere else.
- Stopping a machine deletes files that aren't in a project. Unused time is refunded.
What it can do
| Tool | What it does | Key needed |
|---|---|---|
whoami | Your email, team, balance, GPU limit and what the key may do | Look only |
list_gpus | GPUs with live prices and stock, cheapest first; filter by app, region or memory | Look only |
list_apps | The apps a GPU can start with, their models, and what's installed | Look only |
list_machines · get_machine | Your machines, and how to connect to one (SSH, browser apps, API, endpoint) | Look only |
get_usage · list_receipts | Spending and GPU hours; finished sessions and what each cost | Look only |
list_projects · list_endpoints | Saved projects; endpoints and the machine each one serves | Look only |
launch_machine | Launch a GPU: a quote first, then the launch once you agree | Launch and stop |
extend_machine | Add time at the same price (quote first) | Launch and stop |
set_keep_running | Renew a machine automatically from your team's balance, or turn it off (quote first) | Launch and stop |
stop_machine | Stop a machine; unused time is refunded | Launch and stop |
create_endpoint · get_endpoint_key | Create an endpoint (its key is shown once) or show an endpoint's key when you ask | Launch and stop |
You don't call these yourself: just ask in your own words and the assistant picks the tool.
If something doesn't work
| What you see | What to do |
|---|---|
| Claude Desktop: ComputeNexa doesn't appear, or its log says “spawn uvx ENOENT” | Claude Desktop can't find uvx. In a terminal, run which uvx (Windows: where uvx) and put the full path it prints in "command", e.g. "/Users/you/.local/bin/uvx". Then quit Claude Desktop completely and open it again. |
| “This API key may only look…” | The key is Look only. Create a Launch and stop key and put it in place of the old one, then restart your assistant. |
| The key is refused (“Check CNX_API_KEY…”) | The key was mistyped, revoked, or its creator left the team. Create a new key under API keys. |
| A launch is refused as above the limit | Anything over $25 in one request is refused. Book fewer hours, or raise the limit (step 5). |
| Claude Code: is it connected? | Run claude mcp list: computenexa should show as connected. Inside Claude Code, /mcp shows its status and tools. |
| Getting the newest version | uvx keeps the version it downloaded. To update, run uvx computenexa-mcp@latest --version once, then restart your assistant. |
Your key and your data
- The server runs on your computer and talks only to the ComputeNexa API. Your key stays in your assistant's settings.
- It never shows your API key in its answers. Endpoint keys appear only when you create an endpoint or ask for its key.
- If a key may have leaked, click Revoke on the API keys page: it stops working at once.
- The server is open source: computenexa-mcp on GitHub · on PyPI.
More guides
- Getting started: rent your first GPU: Sign up, pick a GPU and an app, launch it, connect, and stop it when you're done.
- Set up your organization and invite your team: One shared balance for your company: roles, invitations, GPU limits and who can see what.
- Use the ComputeNexa API: Launch, check and stop GPUs from your own scripts, CI jobs or platform with an API key.
- Python SDK: pip install computenexa: launch, use and stop GPUs from Python, with waiting and clear errors built in.
- Command-line tool (cnx): cnx launch, ls, ssh, stop: your GPUs from the terminal, scripts and CI.
- API reference: Every API operation by name (listProjects, launchInstance…), with its request and reply.
- What's in each image: Exactly what's installed in each app's images: Ubuntu, CUDA, Python, packages and versions.
- Run your own app in the browser: Open your own Streamlit, Gradio or FastAPI app on your GPU with one click.
Questions? Email support@computenexa.com.