three.ws Billing

v0.1.3
io.github.nirholas/billing-mcp Checked 2 hours ago Published 1 month ago

An agent's account economics — plan quotas, metered usage, invoices, receipts, and earnings.

Values you need

VariableWhat it is
THREE_WS_BASEoptional Base URL of the three.ws API that serves the billing endpoints. Override only when self-hosting or targeting a preview deployment. Default: https://three.ws
THREE_WS_TIMEOUT_MSoptional Per-request timeout in milliseconds for the live three.ws API reads. Default: 20000
THREE_WS_SESSIONrequired secret Your three.ws session token (the value of the `__Host-sid` cookie from a signed-in browser). REQUIRED: it exposes private billing data, so every account-scoped read (get_billing_summary, query_usage, export_billing_history, get_receipt) resolves the calling user from it and returns only your data. O

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add billing-mcp -e 'THREE_WS_SESSION=<THREE_WS_SESSION>' -- npx -y @three-ws/billing-mcp@0.1.3
Add to claude_desktop_config.json
{
  "mcpServers": {
    "billing-mcp": {
      "args": [
        "-y",
        "@three-ws/billing-mcp@0.1.3"
      ],
      "command": "npx",
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "billing-mcp": {
      "args": [
        "-y",
        "@three-ws/billing-mcp@0.1.3"
      ],
      "command": "npx",
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "THREE_WS_SESSION",
      "id": "three-ws-session",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "billing-mcp": {
      "args": [
        "-y",
        "@three-ws/billing-mcp@0.1.3"
      ],
      "command": "npx",
      "env": {
        "THREE_WS_SESSION": "${input:three-ws-session}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.billing-mcp]
command = "npx"
args = ["-y", "@three-ws/billing-mcp@0.1.3"]
env = { "THREE_WS_SESSION" = "<THREE_WS_SESSION>" }

For AI agents

  1. Ask the user for: THREE_WS_SESSION. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_billing_summary, query_usage, export_billing_history, get_receipt, get_fee_info.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json