headless-tracker
๐ค This project is being developed and maintained autonomously by Hex, an AI dev agent. Decisions log: decisions.md ยท Daily build log: daily-log.md ยท Hex on Bluesky ยท Solo team. No human in the dev loop.
โ ๏ธ Not financial advice. HeadlessTracker is a portfolio data aggregation tool. For informational purposes only. See DISCLAIMER.md for full text.
<p align="center"> <img src="https://raw.githubusercontent.com/tamasPetki/HeadlessTracker/main/docs/demo.png" alt="npx headless-tracker demo โ a sample five-venue portfolio (Bybit, Binance, MetaMask, Solana, Polymarket) rendered in the terminal with no accounts and no API keys" width="720"> </p> <p align="center"><sub>โ Real output of <code>npx headless-tracker demo</code> โ five venues, no accounts, no API keys. Then ask your AI host about it.</sub></p>A read-only MCP server that lets your AI host (Claude Desktop, Claude Code, Cursor, ChatGPT) see your whole crypto portfolio across exchanges, on-chain wallets, and prediction markets โ without ever giving it your API keys, and with no ability to trade or move funds. It reads the numbers; it can't touch the money.
The thesis: AI hosts (Claude Desktop, Claude Code, Cursor, ChatGPT) generate dashboards on demand from structured data. Building yet another tracker UI is wasted work in 2026. Build the data layer; let the AI host be the renderer.
Status: Production-ready and live on npm (version badge above). Five connectors (Bybit, Binance, MetaMask/EVM, Solana, Polymarket), 15 MCP tools, an interactive multi-tab dashboard panel, a CLI for terminal queries, and a 377-test suite. Runs under plain Node (npx headless-tracker) or Bun, working end-to-end with Claude Desktop.
- 5 connectors: Bybit, Binance Spot+Futures, MetaMask multi-chain + multi-wallet, Polymarket, Solana multi-wallet
- 15 MCP tools: 6 data + 7 account/token management + 2 MCP App panels
- 3 MCP prompts:
portfolio-dashboard,weekly-review,risk-check - Interactive dashboard MCP App: 3 tabs (Portfolio / Weekly / Risk) with donut + bar charts, currency switcher, refresh button
- Live Settings MCP App for setup and admin
- CLI portfolio queries:
show holdings / pnl / transactions(no Claude required) - Custom ERC-20 token lists; FIFO + Average Cost on transaction history
- Multi-currency display (USD/EUR/GBP/HUF); CoinGecko + Jupiter spot and historical prices
- Time-windowed PnL (
--timeframe=24h|7d|30d|ytd) - 377-test suite; runs under plain Node or Bun
- Read-only & local-first: no orders/withdrawals/transfers; 3 of 5 connectors need only a public address; secrets live in your OS keychain and never enter the model's context โ see SECURITY.md
See ROADMAP.md for what's done, what's next, and what's intentionally out of scope.
</details>What it does
Connects to your accounts (read-only), normalizes everything into a single schema, exposes it as MCP tools. Then you ask Claude (or any MCP host):
- "What do I own?"
- "How is my portfolio split between crypto and prediction markets?"
- "Show my Polymarket positions grouped by event."
- "Refresh Bybit and tell me my BTC P&L."
The AI host generates the chart, the table, the breakdown. You don't build a UI.
Try it in 60 seconds (no API keys)
The zero-setup version โ one command, no accounts, no keys, not even an address. See a full sample portfolio (five venues; crypto + cash + prediction markets) rendered exactly as your AI host receives it:
npx headless-tracker demoaccount symbol class qty value price
โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโ โโโโโโโโ โโโโโโโ โโโโโโโ
bybit:UNIFIED BTC crypto 0.420000 $25704 $61200
binance:spot SOL crypto 95.0000 $14440 $152.00
metamask:0xd8d2โฆf1a3 WBTC crypto 0.150000 $9150 $61000
solana:7vfCโฆWd9k JUP crypto 1800.00 $1656 $0.9200
polymarket:0x9c1aโฆ7b20 RATE-CUT-2026 (YES) prediction 1500.00 $930.00 $0.6200
โฆ
Total: $104126 (15 positions across 5 venues)
Allocation by asset class:
crypto $88024 84.5% โโโโโโโโโโโโโโโโโโโโ
cash $14900 14.3% โโโ
prediction $1202 1.2% โIt also prints the plain-English questions you'd ask Claude ("what do I own across everything?", "how is it split?") mapped to the MCP tool that answers each. When you want your own numbers, it's the same loop with a real address or read-only key:
You shouldn't have to hand a new tool your exchange keys just to find out whether it's any good. Solana and Polymarket read public on-chain addresses, so you can point HeadlessTracker at any wallet you can see (your own included) with zero credentials.
# install (or prefix any command with `npx`)
npm install -g headless-tracker
# add a public Solana wallet: no API key, just the address
headless-tracker setup solana
# Solana address (base58): <paste any public address>
# (press ENTER through the optional RPC + dust prompts)
# print the holdings right in your terminal, no Claude required
headless-tracker show holdingsaccount symbol class qty value price
โโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโโโโโโ โโโโโโโ โโโโโโโโ
solana:7Xk2โฆq9Fa SOL crypto 12.4081 $2604 $209.88
solana:7Xk2โฆq9Fa USDC crypto 540.0000 $540.00 $1.00
solana:7Xk2โฆq9Fa JUP crypto 1200.00 $612.00 $0.5100
Total: $3756 (3 positions across 1 accounts)(Example output; the account id is shortened here for width. Your numbers come from the live chain.)
That is the whole loop: install, point at a public address, see normalized holdings. When you want your private accounts (Bybit, Binance), setup those too. Every connector uses read-only credentials, kept in your OS keychain, never written to disk and never sent anywhere except the exchange's own API. Then wire it into Claude and ask "what do I own?" to get the same data as a chat-native dashboard.
Non-interactive setup (scripts, Docker, CI)
setup also runs without prompts โ pass flags, and keep any secret in an environment variable (never on the command line, so it stays out of your shell history):
# public-address connectors: everything via flags, zero secrets
headless-tracker setup solana --address=<base58> --dust=0.5
headless-tracker setup polymarket --proxy-wallet=0x...
# connectors with a secret: non-secret config via flags, secret via env
HT_SETUP_ETHERSCAN_KEY=โฆ headless-tracker setup metamask --address=0x... --chains=1,137
HT_SETUP_API_KEY=โฆ HT_SETUP_API_SECRET=โฆ headless-tracker setup bybit --account-type=UNIFIED --also=FUNDHeadless / no OS keychain (Docker, WSL, many Linux servers, CI): there's no Secret Service to write to, so setup registers the account and prints the exact HEADLESS_TRACKER_<CONNECTOR>_<ACCOUNT> env var to set with a JSON credential object โ e.g. HEADLESS_TRACKER_SOLANA_<ADDR>='{"address":"โฆ","dustThresholdUsd":0.5}'. Set it in your MCP server's environment and the data tools read credentials from there. Nothing is ever written to disk.
Interactive dashboard (live UI panel)
For hosts that support MCP Apps โ Claude Desktop, ChatGPT, Goose, VS Code โ say:
Show my dashboard
The host renders a sandboxed iframe in the chat panel with three live tabs:
- Portfolio โ total value KPIs, top positions table, allocation-by-symbol donut (top 7 + "Other" tail), warnings + failures
- Weekly โ 7-day window delta KPIs, recent trades table, skipped-symbols disclosure (with reasons)
- Risk โ concentration audit (single-position, venue, stablecoin reserve, prediction-market overweight) scored PASS / WARN / ALERT, by-venue donut
Plus a currency switcher (USD / EUR / GBP / HUF) and a refresh button. The iframe makes its own follow-up tool calls as the user clicks tabs โ no extra prompting needed once it's open. Optional args:
Open the dashboard in HUF, weekly tab
Implementation: src/mcp/apps/dashboard/ (browser-side TS bundled into a single dist/mcp-apps/dashboard.html via bun run build:apps, ships with the package). The bundled artifact ships inside the npm package so users running npx headless-tracker don't need a build step.
If your host doesn't render MCP Apps yet, the render_dashboard tool still returns a textual confirmation. Use the prompt cookbook below as a fallback โ same workflows, same data, just no live UI panel.
Settings panel (live UI for setup + admin)
For setup that doesn't drop you into a terminal, ask:
Open settings
The Settings MCP App opens with four tabs:
- Accounts โ list of configured accounts with a Remove button (one-way confirm dialog; deletes from both the OS keychain and the registry).
- Add Account โ forms for Bybit / Binance / MetaMask / Solana / Polymarket. Each form validates against the upstream API before persisting credentials. Explicit security disclosure at the top: credentials submitted via the form transit Claude Desktop's process en route to the keychain. All five connectors use READ-ONLY credentials by design (Bybit "Read" only, no Withdraw; Binance "Enable Reading" only, no Trade or Withdraw; Etherscan is a public-data rate-limit token; Polymarket proxy wallet is already public; Solana addresses are public on-chain identifiers). Worst-case leak = portfolio-read, never fund movement. For zero-trust, the CLI flow (
bun run setup <connector>) stays available. - Wallets โ add an additional wallet address to an existing MetaMask OR Solana account (multi-wallet under one MCP account, sharing the same Etherscan key/chain selection or RPC URL).
- Custom Tokens โ list / add / remove ERC-20 tokens per chain. Token data is public on-chain; no keychain involvement.
Either path (CLI or Settings UI) writes to the same ~/.headless-tracker/cache.db + OS keychain, so accounts created via either show up immediately in the dashboard and CLI.
Quick start
1. Install
No clone, no build step, no Bun required. The package runs under plain Node (โฅ 22.5) or Bun. Install it globally:
npm install -g headless-trackerOr run any command without installing by prefixing npx, e.g. npx headless-tracker setup solana. (Building from source for development uses Bun โ see Development.)
2. Configure your accounts (interactive)
Run setup for each integration you want. Each prompts for credentials, validates them, and stores them in your OS keychain (macOS Keychain, Linux Secret Service, Windows Credential Vault). On a headless box with no keychain, see Headless / no OS keychain below.
headless-tracker setup bybit
headless-tracker setup binance
headless-tracker setup metamask
headless-tracker setup solana
headless-tracker setup polymarketVerify what's configured:
headless-tracker list-accountsHeadless / no OS keychain (Docker, WSL, servers, CI)
The OS keychain needs a running secret service (Secret Service / D-Bus on Linux, Keychain on macOS, Credential Vault on Windows). Plenty of real environments don't have one: a Docker container, WSL, a bare Linux server, a CI job. There, the keychain write fails.
In that case setup does not abort. It still registers the account, then prints the exact environment variable to set, for example:
โ OS keychain unavail
โฆ