Back to Directory/Cloud Providers

io.github.KilaWattCloud/kilawatt-mcp-server

Kilawatt Cloud MCP server: request GPU compute with account or x402 payments.

Cloud ProvidersJavaScriptv0.3.0

Kilawatt Cloud provides GPU compute capacity through an MCP server.

The default endpoint is Kilawatt Cloud's gateway: https://www.kilawattcloud.dev/api/public/v1.

Build Status npm version License

Model Context Protocol (MCP) server for Kilawatt Cloud GPU provisioning. Enables Cursor, Claude Desktop, and other AI agents to programmatically request and manage real GPU compute nodes.

This server calls the real Kilawatt gateways. Every response is an actual HTTP result from the Kilawatt public API or the x402 endpoint. There are no fabricated responses.

Works with

Endpoint

The default endpoint is Kilawatt Cloud's gateway: https://www.kilawattcloud.dev/api/public/v1. Change it with the KILAWATT_BASE_URL environment variable.

Installation

Install and run via npx:

npx -y kilawatt-mcp-server

Configuration

Set your Kilawatt API key to use deploy_gpu_node. It is not required to start the server or use the x402 tools:

export KILAWATT_API_KEY=kw_live_YOUR_KEY_HERE

The API key must start with kw_live_. API keys are issued through your Kilawatt Cloud account. Contact hello@kilawattcloud.dev for assistance if you don't have access to generate keys yet.

Use with Claude Desktop / Cursor

Add this configuration to your MCP client settings:

{
  "mcpServers": {
    "kilawatt": {
      "command": "npx",
      "args": ["-y", "kilawatt-mcp-server"],
      "env": {
        "KILAWATT_API_KEY": "kw_live_YOUR_KEY_HERE"
      }
    }
  }
}

Replace kw_live_YOUR_KEY_HERE with your Kilawatt API key when using deploy_gpu_node. For x402-only use, omit KILAWATT_API_KEY.

Using goose? See GOOSE.md.

Running the Server

Start the MCP server:

npm start

Or directly:

node index.js

The server listens on stdio for MCP requests from your agent.

Available Tools

deploy_gpu_node

Provision real GPU compute on Kilawatt Cloud. This starts an actual machine. Set dry_run: true to check pricing and routing without provisioning or charging.

Parameters:

ParameterTypeRequiredDefaultRangeDescription
gpu_typestringNoserver defaultN/AGPU model identifier supported by the endpoint
card_countintegerNo11–64Number of GPUs to provision
duration_secondsnumberNo6001-86400How long the node is needed, in seconds. Billed up front.
routing_policystringNo"lowest_cost"lowest_cost, lowest_latency, zero_quotaHow the smart order router picks a node
dry_runbooleanNofalseN/APrice and pre-authorize only. Returns cost estimate and routing order without provisioning or charging.

Example: Deploy 4 GPUs for 1 hour at lowest cost

{
  "name": "deploy_gpu_node",
  "arguments": {
    "card_count": 4,
    "duration_seconds": 3600,
    "routing_policy": "lowest_cost",
    "dry_run": false
  }
}

Example: Dry-run to check pricing

{
  "name": "deploy_gpu_node",
  "arguments": {
    "card_count": 2,
    "duration_seconds": 1800,
    "dry_run": true
  }
}

Tool results are formatted from the real HTTP response returned by the Kilawatt gateway.

x402 tools

The x402 tools let you request capacity with Base USDC without a Kilawatt account or API key:

  • x402_quote checks the current price and payment details without paying.
  • x402_run_job quotes and pays for one GPU job. It requires confirm: true and a positive max_usd; payment is refused above that amount or either configured spend cap.
  • x402_job_status checks a paid job using the API key saved locally by x402_run_job.

The server must be able to read the following environment variables when you use x402 payments:

VariablePurposeDefault
KILAWATT_X402_PRIVATE_KEYBase-compatible wallet key, needed only to pay with x402_run_jobNot set
KILAWATT_X402_MAX_USD_PER_JOBMaximum price for one paid job0.25
KILAWATT_X402_MAX_USD_PER_SESSIONMaximum cumulative spend in this server process1.00
KILAWATT_X402_URLOverride the x402 execution endpointKilawatt production endpoint

The returned API key is stored at ~/.config/kilawatt/x402-api-key with restrictive file permissions. It is never shown in tool output. Existing deploy_gpu_node still requires KILAWATT_API_KEY.

Use a separate small wallet for x402, and keep its private key out of prompts and shared configuration. The payer does not need ETH; the facilitator submits the transaction.

For x402 users: Check that your Base wallet has enough USDC and that your spend caps allow the amount.

Error Handling

All errors are descriptive and indicate whether anything was provisioned or charged. Common scenarios:

  • 400 Bad Request: Invalid arguments (e.g., card_count > 64). Fix and retry.
  • 401 Unauthorized: API key missing, malformed, or revoked. Issue a new key in your Kilawatt account or contact hello@kilawattcloud.dev.
  • 402 Payment Required: the payment was not accepted. Check your balance and spend caps, then retry.
  • 429 Rate Limited: Concurrency or rate limit hit. Retry after a delay.
  • 503 No Capacity: No nodes available matching your criteria. Try a different gpu_type or smaller card_count.
  • Timeout: Gateway did not respond within 60 seconds. No compute was provisioned; retry if needed.

Links

License

MIT

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y kilawatt-mcp-server

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-kilawattcloud-kilawatt-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kilawatt-mcp-server"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

kilawatt-mcp-servernpm

Compatible MCP Clients

io.github.KilaWattCloud/kilawatt-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More