three.ws Billing — Claude Code MCP server: setup and tools
Lets an autonomous agent check its three.ws plan limits, metered usage invoices, and individual transaction receipts via stdio.
claude mcp add --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --env THREE_WS_SESSION=<THREE_WS_SESSION> --transport stdio billing-mcp -- npx -y @three-ws/billing-mcpWhat three.ws Billing does
This server connects an AI coding agent to the live three.ws billing endpoint. Through stdio calls, the agent inspects account ceilings, remaining MCP call volume, and storage without human intervention. Financial figures appear both in USDC atomic units and human-readable USD strings.
Available tools include get_billing_summary for plan quotas, query_usage for monthly itemized statements, and export_billing_history for CSV payloads. Specific charges resolve through get_receipt using an event ID or purchase ID. Public platform fees are exposed through get_fee_info.
Without an active __Host-sid cookie assigned to THREE_WS_SESSION, account-scoped tools immediately return a 401 error. The server remains strictly read-only: it reveals billing analytics but lacks any capability to execute transfers or alter subscription plans.
What it helps with
- inspect current plan ceilings and daily MCP call allowances
- retrieve line-item usage summaries for a billing period
- export account expense statements directly to CSV
- look up settlement receipts by transaction event ID
Example prompts for the agent
- Check our current three.ws quota ceilings and remaining calls.
- Fetch an itemized usage breakdown for the current calendar month.
- Look up the charge receipt corresponding to event_id 4091.
How to install three.ws Billing
Platform CLI
claude mcp add --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --env THREE_WS_SESSION=<THREE_WS_SESSION> --transport stdio billing-mcp -- npx -y @three-ws/billing-mcpReplace <…> with your own values
Platform CLI
codex mcp add billing-mcp --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --env THREE_WS_SESSION=<THREE_WS_SESSION> -- npx -y @three-ws/billing-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"billing-mcp": {
"command": "npx",
"args": [
"-y",
"@three-ws/billing-mcp"
],
"env": {
"THREE_WS_BASE": "<THREE_WS_BASE>",
"THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>",
"THREE_WS_SESSION": "<THREE_WS_SESSION>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"billing-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@three-ws/billing-mcp"
],
"env": {
"THREE_WS_BASE": "<THREE_WS_BASE>",
"THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>",
"THREE_WS_SESSION": "<THREE_WS_SESSION>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e THREE_WS_BASE=<THREE_WS_BASE> -e THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> -e THREE_WS_SESSION=<THREE_WS_SESSION> billing-mcp npx -y @three-ws/billing-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about three.ws Billing
How to install three.ws Billing in Claude Code?
Run claude mcp add billing-mcp -e THREE_WS_SESSION=<THREE_WS_SESSION> -- npx -y @three-ws/billing-mcp in your terminal. Replace the session placeholder with your active __Host-sid browser cookie.
What does three.ws Billing do?
It allows agents to autonomously query live usage quotas, itemized fees, transaction receipts, and platform fee percentages from three.ws.
Can this MCP server trigger payments or fund transfers?
No, all endpoints operate in read-only mode. The server can only inspect existing statements and receipts, without any mutation or payment capabilities.