three.ws Billing
v0.1.3An agent's account economics — plan quotas, metered usage, invoices, receipts, and earnings.
Values you need
| Variable | What it is | |
|---|---|---|
THREE_WS_BASE | optional | 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_MS | optional | Per-request timeout in milliseconds for the live three.ws API reads. Default: 20000 |
THREE_WS_SESSION | required 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.3Add 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
- Ask the user for: THREE_WS_SESSION. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_billing_summary, query_usage, export_billing_history, get_receipt, get_fee_info.
- 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