Token MCP Server

Local-first dashboard + MCP server for Claude Code and Codex token usage. MCP-aware, multi-vendor, MIT.

Local serverstdio

What is the Token MCP server?

Local-first dashboard + MCP server for Claude Code and Codex token usage. MCP-aware, multi-vendor, MIT. The token mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 4 defined tools rather than through you.

What it actually does

Token Meter parses the JSONL files that Claude Code and Codex already write to disk and turns them into a real dashboard: cost per project, per model, per MCP tool, per hour. Your data never leaves your machine.

  • Your JSONL contains source code, prompts, and tool results. Token Meter never
  • No SDK to integrate, no proxy to configure for the free tier
  • The CLI and dashboard core are MIT licensed

Adding it to your client

The server ships on npm as @whdrnr2583/token-meter, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Its toolset

Everything the assistant can do here goes through one of these:

  • usage_summary — Daily table of token counts, USD-equivalent cost, and call counts — broken down by day and model
  • recent_sessions — Latest sessions with paste-ready claude --resume / codex resume commands
  • session_tools — Per-tool breakdown inside a session: call count, total tokens, average latency, response size
  • refresh_data — Re-scans your local JSONL logs for new activity, then returns a fresh summary

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the token mcp server does with a few real requests.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Token's toolset — usage_summary, recent_sessions, session_tools and 1 more — is a fair guide to whether it matches your workflow. It is maintained by whdrnr2583; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Token's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
usage_summaryDaily table of token counts, USD-equivalent cost, and call counts — broken down by day and model
recent_sessionsLatest sessions with paste-ready claude --resume / codex resume commands
session_toolsPer-tool breakdown inside a session: call count, total tokens, average latency, response size
refresh_dataRe-scans your local JSONL logs for new activity, then returns a fresh summary

How to install the Token MCP server

{
  "mcpServers": {
    "token-meter": {
      "command": "npx",
      "args": ["-y", "@whdrnr2583/token-meter"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Token to usage summary.
  • Use Token to recent sessions.
  • Use Token to session tools.

Frequently asked questions

It connects Token to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (usage_summary, recent_sessions, session_tools, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Token directly.