Kilawatt Mcp Server

io.github.KilaWattCloud由 GitHub 账号 KilaWattCloud 发布v0.3.0更新于 Oct 24, 2026

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

已验证STDIO仅桌面云端与基础设施金融

概览

AI 生成的概览

在 Kilawatt Cloud 上申请 GPU 算力,可用账户 API 密钥,也可通过 x402 以 Base USDC 按任务付费。

可以做什么
  • 按 GPU 型号、卡数、时长和路由策略开通 GPU 节点,可用 dry-run 只询价不扣费
  • 以 Base USDC 报价并支付单个 GPU 任务,随后查询任务状态
  • 读取 GPU 容量、平台状态和每小时参考价格
  • 检查任务能否从最近检查点恢复,并在其他供应商上启动付费的恢复运行
适用场景
当助手需要评估、询价或启动 Kilawatt Cloud 上的 GPU 算力,或在付费前查看可用性与平台状态时使用。适合需要短时 GPU 任务、按次付费而非走账户的智能体流程。
运行要求
通过 npx 在本地运行的 Node.js 进程,需能访问 Kilawatt 网关与站点。deploy_gpu_node、get_resume_info 和 resume_job 需要 KILAWATT_API_KEY(须以 kw_live_ 开头)。使用 x402 支付需 KILAWATT_X402_PRIVATE_KEY,即持有 USDC 的 Base 兼容钱包私钥。可选覆盖项:KILAWATT_BASE_URL、KILAWATT_SITE_URL、KILAWATT_X402_URL、KILAWATT_X402_MAX_USD_PER_JOB、KILAWATT_X402_MAX_USD_PER_SESSION。
安装前请注意
这些工具会真实花钱:deploy_gpu_node 会启动机器并从 Kilawatt 钱包扣费,resume_job 会启动新的付费运行。付费前先用 dry_run 和 x402_quote 询价并确认。KILAWATT_X402_PRIVATE_KEY 是钱包私钥,应使用单独的小额钱包,并避免出现在提示词和共享配置中。消费上限默认每任务 0.25 美元、每会话 1.00 美元。x402 返回的 API 密钥会写入本地配置文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kilawatt Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Kilawatt Cloud MCP Server

Model Context Protocol (MCP) server for requesting GPU compute capacity from Kilawatt Cloud, with account-based and x402 payment options.

[Build Status] [npm version] [License]

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.

Table of contents

Works with

All examples are quote-only. See examples/README.md.

Client setup steps are in docs/clients.md.

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.

The discovery and resume tools (get_capacity, get_platform_status, get_pricing, get_resume_info and resume_job) use the site root instead: https://www.kilawattcloud.dev. Change it with the optional KILAWATT_SITE_URL environment variable. A trailing slash is removed.

VariableUsed byDefault
KILAWATT_BASE_URLdeploy_gpu_nodehttps://www.kilawattcloud.dev/api/public/v1
KILAWATT_SITE_URLget_capacity, get_platform_status, get_pricing, get_resume_info, resume_jobhttps://www.kilawattcloud.dev

Installation

Install and run via npx:

bash
npx -y kilawatt-mcp-server

Configuration

Set your Kilawatt API key to use deploy_gpu_node, get_resume_info or resume_job. It is not required to start the server, use the x402 tools, or use get_capacity, get_platform_status and get_pricing:

bash
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 [email protected] 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:

json
{  "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:

bash
npm start

Or directly:

bash
node index.js

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

Available Tools

The server exposes nine tools: deploy_gpu_node, x402_quote, x402_run_job, x402_job_status, get_capacity, get_platform_status, get_pricing, get_resume_info and resume_job.

deploy_gpu_node

Provision real GPU compute on Kilawatt Cloud. This starts an actual machine and charges the caller's Kilawatt wallet. Set dry_run: true to check pricing and routing without provisioning or charging. Requires KILAWATT_API_KEY.

ParameterTypeRequiredDefaultAllowed valuesDescription
gpu_typestringNonvidia-h100Any non-empty string up to 64 characters (no enum is checked locally)GPU model identifier; the gateway decides what it accepts
card_countintegerNo11 to 64Number of GPUs
duration_secondsnumberNo6001 to 86400How long the node is needed. Billed up front.
routing_policystringNolowest_costlowest_cost, lowest_latency, zero_quotaHow the smart order router picks a node
dry_runbooleanNofalsetrue, falsePrice and pre-authorize only
json
{  "name": "deploy_gpu_node",  "arguments": { "card_count": 2, "duration_seconds": 1800, "dry_run": true }}

x402_quote

Get the current price and Base USDC payment details for a GPU job without paying.

ParameterTypeRequiredDefaultAllowed valuesDescription
gpu_typestringNonvidia-h100nvidia-b300, nvidia-b200, nvidia-h200, nvidia-h100, nvidia-a100, nvidia-l40s, nvidia-l40, nvidia-a40, nvidia-a10, nvidia-rtx-a6000, nvidia-rtx-a5000, nvidia-rtx-a4500, nvidia-rtx-a4000, nvidia-rtx-5090, nvidia-rtx-4090, nvidia-rtx-3090GPU model
card_countintegerNo11 to 4 for nvidia-b200; 1 to 8 for nvidia-h100, nvidia-h200, nvidia-a100, nvidia-l40s; 1 to 16 for all othersNumber of GPUs
duration_secondsnumberNo60060 to 86400Job length in seconds
routing_policystringNonot sentlowest_cost, lowest_latency, zero_quotaRouting policy
workload_typestringNonot sentagent_exec, fine_tune, batch_inferenceWorkload type

The published input schema states a maximum of 16 for card_count. The tighter per-GPU limits above are enforced in code when the call is made.

x402_run_job

Quote and pay for one GPU job in Base USDC. Takes the same parameters as x402_quote, plus:

ParameterTypeRequiredDescription
max_usdnumberYesMust be greater than 0. Payment is refused above this amount or above either spend cap.
confirmbooleanYesMust be true or nothing is paid.

x402_job_status

Get the status of a job created through x402, using the API key saved locally by x402_run_job.

ParameterTypeRequiredDescription
job_idstringYes1 to 128 characters

get_capacity

Read current GPU capacity data. Read-only. No API key and no arguments. Calls GET {KILAWATT_SITE_URL}/api/capacity. If the data is not available right now (HTTP 503 with code unavailable), the tool says so.

json
{ "name": "get_capacity", "arguments": {} }

get_platform_status

Read the platform status. Read-only. No API key and no arguments. Calls GET {KILAWATT_SITE_URL}/api/status. The result has status (operational, degraded, incident or unknown), status_note, last_checked, status_page and latest_test_summary.

json
{ "name": "get_platform_status", "arguments": {} }

get_pricing

Read indicative USD prices per GPU hour for each GPU tier. Read-only. No API key and no arguments. Calls GET {KILAWATT_SITE_URL}/api/pricing. These prices are indicative only. The exact price for a job comes from an unpaid x402 request, for example x402_quote.

json
{ "name": "get_pricing", "arguments": {} }

get_resume_info

Check whether a job can be resumed from its last checkpoint. Read-only: nothing is started or charged. Requires KILAWATT_API_KEY. Calls GET {KILAWATT_SITE_URL}/api/jobs/{job_id}/resume-info.

ParameterTypeRequiredDescription
job_idstringYes36 characters, hex digits and dashes. Checked before any request is sent.

The result has job_id, checkpoint_count, last_checkpoint_at, can_resume, reason (null, no_checkpoint or job_still_running) and resume_action.

json
{ "name": "get_resume_info", "arguments": { "job_id": "YOUR_JOB_ID" } }

resume_job

Start a new paid run that resumes a job from its last checkpoint on a different supplier. This spends money. Requires KILAWATT_API_KEY. Call get_resume_info first and ask the user before confirming. Calls POST {KILAWATT_SITE_URL}/api/jobs/{job_id}/resume once and never retries it automatically.

ParameterTypeRequiredDescription
job_idstringYes36 characters, hex digits and dashes
confirmbooleanYesMust be exactly true
max_spend_usdnumberYesSpend cap for the new run. Must be greater than 0.
duration_secondsintegerNo60 to 86400. Sent only when given.

All of these are checked locally before any request is sent. If a check fails, nothing is sent.

json
{  "name": "resume_job",  "arguments": { "job_id": "YOUR_JOB_ID", "confirm": true, "max_spend_usd": 5 }}

Differences between deploy_gpu_node and the x402 tools

  • gpu_type is free text (up to 64 characters) in deploy_gpu_node but a fixed list in the x402 tools.
  • card_count allows up to 64 in deploy_gpu_node but at most 16 (less for some GPUs) in the x402 tools.
  • duration_seconds allows 1 to 86400 in deploy_gpu_node but 60 to 86400 in the x402 tools.
  • deploy_gpu_node defaults routing_policy to lowest_cost; the x402 tools send no routing policy unless you set one.

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

x402 settings

The x402 tools let you request capacity with Base USDC without a Kilawatt account or API key. Spend caps are enforced locally.

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 [email protected].
  • 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

来源:README.md,提交 ef69868

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v0.3.0最新Oct 20, 2026
  2. v0.2.1Oct 14, 2026
  3. v0.1.3Sep 27, 2026
  4. v0.1.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分