Tokmeter — AI Agent Usage & Cost
Track token use and cost across 24 AI coding agents from local session files
Tokmeter — AI Agent Usage & Cost is a free MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Free
- Platforms
- CLI, macOS, Web
- Runs
- Locally
- Version
- 1.28.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add tokmeter -- npx -y @sriinnu/tokmeter-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"tokmeter": {
"command": "npx",
"args": [
"-y",
"@sriinnu/tokmeter-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"tokmeter": {
"command": "npx",
"args": [
"-y",
"@sriinnu/tokmeter-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"tokmeter": {
"command": "npx",
"args": [
"-y",
"@sriinnu/tokmeter-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"tokmeter": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sriinnu/tokmeter-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add tokmeter -- npx -y @sriinnu/tokmeter-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.tokmeter]
command = "npx"
args = ["-y", "@sriinnu/tokmeter-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"tokmeter": {
"command": "npx",
"args": [
"-y",
"@sriinnu/tokmeter-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Or run: gemini mcp add -s user tokmeter npx -- -y @sriinnu/tokmeter-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "tokmeter": { "command": "npx", "args": [ "-y", "@sriinnu/tokmeter-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Tokmeter — AI Agent Usage & Cost
Tokmeter reads the session logs that coding agents already write to disk and totals tokens and cost by project, model, provider and day. It covers 24 agents and editors including Claude Code, Codex, Gemini CLI, Cursor and Cline, and an unsupported agent can register a path.
Nothing leaves your machine: no API keys, telemetry or account. Pricing comes from public catalogues, and an append-only daily ledger keeps history after agents rotate their logs. Surfaces include a CLI, terminal UI, web dashboard, Claude Code statusline and macOS menubar app.
The MCP server has 22 read-only tools for usage queries, comparisons, forecasts and export, with cleanup previews only. It needs Node.js 22 or later.
What it does
- Cross-agent ledger
- One total across 24 agents.
- Local only
- No account or telemetry.
- Daily history
- Ledger survives log rotation.
- Menubar app
- Shows today's cost on macOS.
- MCP queries
- 22 read-only tools.
- Statusline
- Claude Code statusline.
Good for
- See which project burns the most tokens
- Compare models by cost
- Forecast spending
- Let an agent check its own spend
Pricing
Free
Free; no account
Tokmeter — AI Agent Usage & Cost FAQ
Does data leave my machine?
No.
Are the MCP tools read-only?
Yes, all 22.
What do I need?
Node.js 22 or newer.
Is there a menubar app?
Yes, for macOS 14 on Apple silicon.
Is Tokmeter — AI Agent Usage & Cost free?
Yes. Tokmeter — AI Agent Usage & Cost is free to use.
How do I add Tokmeter — AI Agent Usage & Cost to Claude Code?
Run this command in your terminal: claude mcp add tokmeter -- npx -y @sriinnu/tokmeter-mcp
What are the best alternatives to Tokmeter — AI Agent Usage & Cost?
The closest alternatives to Tokmeter — AI Agent Usage & Cost are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


