Skip to content
tokenburnmarket

docs / setup

One command binds your machine.

The collector reads what ccusage reads. Token counts, cost, and hashes of message identifiers go up. Prompts, file names, and project paths do not.

Connect

Sign in first, then run this on the machine you code on.

npx tokenburnmarket connect

It generates a keypair, prints a device name, a fingerprint and a short code, and waits. Open the URL it prints, check that the fingerprint in the browser matches the one in your terminal, and approve. The code lasts ten minutes. The private key never leaves the machine.

Once approved it runs the first sync right there and prints the link to your profile. A machine with years of transcripts takes about half a minute the first time.

Connecting a second time replaces the stored device. Revoke the old one in settings. Each machine you connect is its own device, and two devices reading the same transcripts are not counted twice.

Sync

A sync is one signed upload: the daily totals that changed, plus the receipt stream for those days.

npx tokenburnmarket sync
npx tokenburnmarket sync --since 7
npx tokenburnmarket sync --dry-run
npx tokenburnmarket status
sync
The days since the last sync.
--since 7
The last seven days instead, whatever the watermark says.
--dry-run
Prints what would go up and sends nothing.
--quiet
Prints nothing unless something went wrong. For cron lines and scripts.
status
Handle, device, server, and the last day synced from this machine.

Keep it synced

Point Claude Code at the MCP server. That is the whole of it: the server syncs itself every time the agent starts it, and gives the agent the trading tools below.

claude mcp add tokenburnmarket -- npx -y tokenburnmarket mcp

Codex gets the same from ~/.codex/config.toml:

[mcp_servers.tokenburnmarket]
command = "npx"
args = ["-y", "tokenburnmarket", "mcp"]

A startup sync stands down when the last one was under ten minutes ago, so two agents open at once read your transcripts once. Nothing it does is visible from inside the agent. npx tokenburnmarket mcp setup prints both of these again when the terminal has scrolled away.

no agent on this machine

Run a daemon instead. A foreground loop, one per machine, held by a lock file.

npx tokenburnmarket daemon --interval 15m
npx tokenburnmarket daemon install

daemon install prints the launchd job or the systemd user unit for this machine, pointing at this node and this script. It prints; it never writes.

MCP tools

toolwhat it does
sync_usageuploads this machine's usage and reports what the server made of it
my_statstoday, this week and this month of spend and tokens, credits, trust
my_communitiesthe communities you belong to
list_marketsopen markets you can trade, with the price of every outcome
place_betquotes a trade, and places it only with confirm: true

place_bet never spends without confirm: true. Called without it, it prices the trade against the live book, writes nothing, and returns the cost, the average price and where the price would land. See markets for what happens when the price moves between the quote and the fill.

Where things are stored

Config lives in the platform config directory: ~/Library/Application Support/tokenburnmarket on macOS, %APPDATA%\tokenburnmarket on Windows, $XDG_CONFIG_HOME/tokenburnmarket elsewhere. It holds a device token and a private key, and is written owner-only.

TBM_SERVER points the collector at another server, the same as --server. TBM_CCUSAGE names a local ccusage command to run instead of npx -y ccusage@latest. npx tokenburnmarket --help lists every command.