Prerequisites
- A Thunder Compute account
- An AI agent that supports remote MCP servers (Claude Code, Cursor, etc.)
Setup
- Claude Code
- Cursor
- Windsurf
- Direct HTTP
Run this in Claude Code:Then run
/mcp to authenticate. A browser window will open for you to log in and authorize access.Manual setup
Manual setup
Alternatively, add to
~/.claude.json (global) or .claude.json in your project root:Authentication
No API tokens or environment variables needed. When you first connect, a browser window opens for you to log in with your Thunder Compute account and authorize access. Tokens are refreshed automatically — you only authenticate once per session.If your agent doesn’t support OAuth-based MCP authentication, you can use the local stdio transport with the
tnr-mcp npm package instead. See Local (stdio) below.Available Tools
| Tool | Description |
|---|---|
list_instances | List all GPU instances with status, IP, and configuration |
create_instance | Create a new GPU instance (specify GPU type, template, mode, etc.) |
delete_instance | Delete an instance (irreversible) |
modify_instance | Change instance config (GPU type, vCPUs, disk, mode) |
get_specs | Get available GPU specs (VRAM, vCPU options, storage ranges) |
get_pricing | Get current per-hour GPU pricing |
list_templates | List available OS templates (Ubuntu, PyTorch, etc.) |
list_snapshots | List all instance snapshots |
create_snapshot | Create a snapshot of an instance |
delete_snapshot | Delete a snapshot (irreversible) |
list_ssh_keys | List SSH keys in your organization |
add_ssh_key | Add an SSH public key |
delete_ssh_key | Delete an SSH key |
list_ports | List all instances with their forwarded ports |
forward_port | Forward HTTP ports on an instance |
remove_port | Remove forwarded ports from an instance |
get_ssh_command | Get the SSH command to connect to an instance |
get_scp_command | Get the SCP command to copy files to/from an instance |
Prompts
The MCP server includes built-in prompts that guide your agent through common multi-step workflows:| Prompt | Description |
|---|---|
create-dev-instance | Set up a GPU development instance with sensible defaults |
deploy-model | Deploy an ML model (supports Ollama, vLLM, and Transformers) |
check-costs | Review running instances and estimated hourly costs |
snapshot-and-teardown | Save instance state and clean up |
Example Usage
Once configured, you can ask your AI agent things like:- “Spin up an A100 instance with PyTorch”
- “What GPU types are available and how much do they cost?”
- “List my running instances”
- “Delete instance inst-abc123”
- “Forward port 8080 on my instance”
- “Create a snapshot of my instance before I make changes”
- “Deploy Llama 3 on a GPU”
Local (stdio) Transport
If your agent doesn’t support remote MCP with OAuth, you can run the MCP server locally instead. This uses thetnr-mcp npm package, which runs on your machine and connects to the Thunder Compute API using an API token.
Requirements: Node.js (npx must be available)
1. Get an API token
Generate a token from the Thunder Compute console, or runtnr login via the CLI.
2. Add the MCP server
- Claude Code
- Cursor
- Windsurf
tnr login, you can omit THUNDER_API_TOKEN — the server picks up credentials from ~/.thunder/cli_config.json automatically.
Troubleshooting
Authentication fails or browser doesn’t open: Run/mcp in Claude Code to manually trigger authentication. Make sure you’re logged in to your Thunder Compute account in the browser.
“Protected resource does not match” error: The URL in your MCP config must match the server’s configured resource URL exactly. Ensure you’re using https://api.thundercompute.com:8443/mcp.
“token has invalid issuer” error: This is a server-side configuration issue. The MCP authentication client must be configured with the correct Stytch Connected Apps domain.
Tools not appearing: Restart your AI agent after changing MCP configuration. Most agents only read MCP config on startup.
Stdio server not starting: If using the local transport, verify npx is available by running which npx. If not, install Node.js from https://nodejs.org.