# CloudGPU MCP server

> Allows an AI agent to compare GPU compute costs, rent instances, run training jobs, and manage files via an OpenAI-compatible API and secure orchestration.

- Repository: https://github.com/cloudgpu-app/cloudgpu-mcp
- Page: https://hostedmcp.org/servers/cloudgpu-app/cloudgpu-mcp
- Transport: stdio, remote
- Stars: 1
- License: MIT
- Latest version: 0.16.3

## Install

### Claude Code

```sh
claude mcp add --env CLOUDGPU_API_KEY=<YOUR_CLOUDGPU_API_KEY> cloudgpu-mcp -- npx -y cloudgpu-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "cloudgpu-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cloudgpu-mcp"
      ],
      "env": {
        "CLOUDGPU_API_KEY": "<YOUR_CLOUDGPU_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "cloudgpu-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cloudgpu-mcp"
      ],
      "env": {
        "CLOUDGPU_API_KEY": "<YOUR_CLOUDGPU_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "cloudgpu-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cloudgpu-mcp"
      ],
      "env": {
        "CLOUDGPU_API_KEY": "<YOUR_CLOUDGPU_API_KEY>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.cloudgpu-mcp]
command = "npx"
args = ["-y", "cloudgpu-mcp"]

[mcp_servers.cloudgpu-mcp.env]
CLOUDGPU_API_KEY = "<YOUR_CLOUDGPU_API_KEY>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "cloudgpu-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cloudgpu-mcp"
      ],
      "env": {
        "CLOUDGPU_API_KEY": "<YOUR_CLOUDGPU_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CLOUDGPU_API_KEY` | no | yes | Optional CloudGPU API key. Without a key, use public discovery and connect_account for an owner-approved scoped key. |

## Tools (15)

- `get_account`
- `list_gpus`
- `list_templates`
- `compare_compute_costs`
- `estimate_cost`
- `create_instance`
- `run_command`
- `tail_logs`
- `stop_instance`
- `list_models`
- `run_job`
- `cancel_job`
- `login`
- `templates`
- `balance`

## FAQ

### How can I use CloudGPU with an AI agent?

You can add the local MCP server to clients like Claude Code, Cursor, or Cline using npx, or use the browser-approval flow to connect your account without manually pasting an API key.

### Can I use my CloudGPU balance for model inference?

Yes, the same API key and balance cover CloudGPU's OpenAI-compatible model API, allowing agents to call hosted models without renting a GPU.

### How does the server prevent unexpected high costs?

The server implements guardrails such as mandatory quotes before renting, server-side spending limits, maximum hour caps, and idle limits that automatically destroy instances.

### Is it safe to share my API key in a chat?

No, you should never paste your password or API key into the conversation; instead, use the connect_account flow or environment variables.
