MCP setup
Ask Claude about your AI spend.
The TokenEyez MCP server plugs your usage dashboard into Claude Desktop, Cursor, and Claude Code so you can ask plain-language questions — "how much did I spend on Opus this week?" — without leaving your editor.
★ Pro featurenpm) and a TokenEyez Pro account.
Total setup time on a fresh machine: about 90 seconds.
-
Install the package
Open a terminal — macOS / Linux: Terminal app · Windows: PowerShell — and run:
npm install -g @tokeneyez/mcpThis installs the
tokeneyezCLI and the MCP server globally on your machine. -
Sign in
Same account as the Chrome extension — you only do this once per machine.
tokeneyez loginA browser tab opens. Click Authorize. Done — you'll see
Signed in as you@example.comin the terminal. -
Add to your AI client
Pick the one you use. You can repeat for multiple clients.
One command — installs a Stop hook so every Claude Code turn lands in your dashboard automatically:
tokeneyez installAfter your next Claude Code turn, run
tokeneyez todayto see it land. Remove anytime withtokeneyez uninstall.What it does: writes a single line into your Claude Codesettings.json— a Stop hook that firestokeneyez-hookafter every turn. No prompt content leaves your machine; only token counts and model name.Open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Add a
mcpServersentry (or merge into your existing one):{ "mcpServers": { "tokeneyez": { "command": "tokeneyez-mcp" } } }Quit Claude Desktop completely (Cmd-Q / Alt-F4) and reopen. The MCP icon (a tiny hammer) appears in the bottom of the chat input — that confirms tokeneyez is loaded.
If the file already has other MCP servers, just add"tokeneyez": { ... }as a new key inside the existingmcpServersobject. Don't replace the whole file.Cursor's MCP integration ships out of the box. One command does it:
tokeneyez install-cursorRestart Cursor. Open the AI chat → ⚙ settings → MCP servers →
tokeneyezshould be listed and green. - macOS:
-
Try it
Ask any of these in your AI client (or invent your own):
- "How much did I spend on AI this week?"
- "Which model burned the most tokens today?"
- "What's my Pro quota status?"
- "Show me my top 5 most expensive prompts this month."
- "Am I close to my monthly budget?"
The MCP answers in plain language and shows live numbers pulled straight from your dashboard.
Troubleshooting
"npm: command not found"
Node.js isn't installed yet. Grab the LTS installer from nodejs.org. After installing, close and reopen your terminal, then retry step 1.
"EACCES: permission denied" on npm install
This is an npm permissions issue on macOS / Linux. The cleanest fix is to use nvm to manage Node, which puts npm under your home directory and skips the permissions trap.
Quick workaround: prefix with sudo — sudo npm install -g @tokeneyez/mcp.
I ran tokeneyez login but it says "browser didn't open"
The CLI prints a URL and a token. Copy the URL into any browser, sign in, and you'll see an Authorize button. Once you click it, the CLI completes automatically.
Claude Desktop doesn't show the hammer / tokeneyez isn't listed
Three things to check:
- Did you fully quit Claude Desktop (not just close the window)? On macOS, Cmd-Q. On Windows, right-click the tray icon → Quit.
- Is your JSON valid? Paste it into jsonlint.com to check.
- Did
npm install -gsucceed? Runtokeneyez --versionto confirm.
"Not signed in" when the MCP runs
Run tokeneyez login again. Sessions can expire if you've signed in from another device. The browser dance is the same — about 5 seconds.
Can I remove the MCP later?
Yes. Run tokeneyez uninstall for the Claude Code hook, or tokeneyez uninstall-cursor for Cursor. For Claude Desktop, remove the "tokeneyez" entry from your mcpServers in claude_desktop_config.json and restart.
To remove the package entirely: npm uninstall -g @tokeneyez/mcp.
What data does the MCP send?
Only what's already in your dashboard — daily totals, per-model breakdowns, quota state. Your prompts and responses never leave your machine. The MCP server runs locally and reads from the TokenEyez API using your session token, which lives in ~/.tokeneyez/session.json.