Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’» Developer Tools
  3. MCP Cost Tracker Router
MCP Cost Tracker Router logo
Health: ActiveRecent health check succeeded.Last checked 9/7/2026, 7:31:05 PM

MCP Cost Tracker Router

User RatingsBe the first to rate and review this MCP server! Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View RepositoryVisit Website

Real-time cost awareness for MCP agent workflows

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β€” we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-cost-tracker-router": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/inspector"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Tool Schemas (15) Directory Badge Claim listing AlternativesπŸ’» More in Developer Tools

Capabilities & Tool Schemas (15) ~519 tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server β€” may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by MCP Cost Tracker Router.

get_session_cost

Returns token totals and USD cost estimates for the current session. Read-only.

get_tool_costs

Returns per-tool cost breakdown for the session, sorted by cost descending. Read-only.

reset_session

Start a new cost-tracking session. Previous session data is retained in history.

record_usage

Record token usage for a tool call. Takes `tool_name`, `model` (optional), `input_tokens`, and `output_tokens`. Emits a budget warning notification if 80% of threshold is reached.

set_budget_alert

Set a budget threshold in USD (`threshold_usd`). Warns at 80% and 100% of the threshold. Use with `--enforce-budget` to block calls beyond the limit.

suggest_model_routing

Heuristic model recommendation by task type. Takes `task_description` and optional `constraints.max_cost_usd`. Returns recommended model with reasoning and estimated cost.

Documentation Overview

MCP Cost Tracker & Router

npm mcp-cost-tracker-router package

Local-first cost awareness for MCP agent workflows. Token counts are calculated offline using js-tiktoken β€” no proxy, no API round-trip, no spend data leaving your machine. When costs climb, routing suggestions point you to cheaper models before the invoice arrives.

Tool reference | Configuration | Contributing | Troubleshooting

Key features

  • Per-tool cost breakdown: See exactly which tool calls are consuming the most tokens and budget.
  • Budget alerts: Set a session spend threshold and get warned at 80% and 100% before you exceed it.
  • Offline token counting: Uses js-tiktoken for accurate counts β€” no API calls required.
  • Model routing suggestions: Recommends cheaper models for the current task type (advisory, never enforced without opt-in).
  • Multi-provider pricing: Tracks costs across Claude, OpenAI, and Gemini models from a single configurable pricing table.
  • Spend history: Query daily, weekly, and monthly totals by model or tool.
  • Project cost allocation: Tag sessions to named projects and generate chargeback reports.
  • HTML spend reports: Export a single-file, self-contained HTML report with charts and budget status.
  • Audit log: Append-only log of every budget enforcement decision.

Why this over proxy-based cost trackers?

Most cost-tracking tools work by routing all your API traffic through their server and measuring tokens server-side. That means your prompts and responses transit a third-party service, and you're dependent on their uptime.

mcp-cost-tracker-routerProxy-based trackers (Helicone, LLMonitor, etc.)
Token countingOffline via js-tiktoken β€” no network callCounted server-side after traffic is proxied
Data residencyLocal SQLite onlyPrompts + responses pass through vendor servers
Model routingBuilt-in suggest_model_routing toolRarely included; usually a separate paid tier
Multi-providerClaude, OpenAI, Gemini in one pricing tableOften single-provider or requires separate setup
Uptime dependencyNone β€” fully offlineBreaks if proxy is down

If your prompts contain sensitive information or you can't route traffic through a third party, this is the right tool. If you need a managed dashboard with team sharing, a proxy-based service may suit you better.

Disclaimers

mcp-cost-tracker-router stores tool call metadata (token counts, model names, timestamps) locally in SQLite. It does not store prompt or response content. Cost calculations are estimates based on a local pricing table and may not exactly match your provider's invoice.

Requirements

  • Node.js v20.19 or newer.
  • npm.

Getting started

Add the following config to your MCP client:

config.json
{
  "mcpServers": {
    "cost-tracker": {
      "command": "npx",
      "args": ["-y", "mcp-cost-tracker-router@latest"]
    }
  }
}

To set a session budget alert:

config.json
{
  "mcpServers": {
    "cost-tracker": {
      "command": "npx",
      "args": ["-y", "mcp-cost-tracker-router@latest", "--budget-alert=5.00"]
    }
  }
}

MCP Client configuration

Amp Β· Claude Code Β· Cline Β· Cursor Β· VS Code Β· Windsurf Β· Zed

Your first prompt

Enter the following in your MCP client to verify everything is working:

Code
How much has this session cost so far?

Your client should return a token and USD cost summary for the current session.

Tools

Session (4 tools)

  • get_session_cost β€” Returns token totals and USD cost estimates for the current session. Read-only.
  • get_tool_costs β€” Returns per-tool cost breakdown for the session, sorted by cost descending. Read-only.
  • reset_session β€” Start a new cost-tracking session. Previous session data is retained in history.
  • record_usage β€” Record token usage for a tool call. Takes tool_name, model (optional), input_tokens, and output_tokens. Emits a budget warning notification if 80% of threshold is reached.

Budgets & routing (3 tools)

  • set_budget_alert β€” Set a budget threshold in USD (threshold_usd). Warns at 80% and 100% of the threshold. Use with --enforce-budget to block calls beyond the limit.
  • suggest_model_routing β€” Heuristic model recommendation by task type. Takes task_description and optional constraints.max_cost_usd. Returns recommended model with reasoning and estimated cost.
  • check_routing_policy β€” Check whether a model is allowed for a given task type under the routing policy. Takes task_type and model.

History & reports (4 tools)

  • get_spend_history β€” Query historical spend aggregated by period (day/week/month). Returns breakdown by model and tool. Read-only.
  • estimate_workflow_cost β€” Pre-run cost estimation for a multi-step workflow. Takes a steps array with tool_name, estimated_input_tokens, estimated_output_tokens, and optional model. Read-only.
  • export_spend_report β€” Generate a single-file HTML spend report with session breakdown, historical spend, model cost comparison, and budget status. Read-only.
  • export_budget_audit β€” Export the audit log of budget enforcement decisions. Accepts optional from_date, to_date, and format (json/csv). Read-only.

Project allocation (4 tools)

  • set_project β€” Create or update a project with an optional budget_usd. Takes project_name.
  • tag_session β€” Tag the current session with a project_name for cost allocation.
  • get_project_costs β€” Get cost report for a project. Takes project_name and optional since (ISO date). Read-only.
  • export_chargeback β€” Generate a chargeback report for internal billing. Takes from_date, to_date, optional group_by (project/session), and optional format (json/csv). Read-only.

Configuration

--budget-alert

Session spend threshold in USD. A warning is returned when session costs reach 80% and again at 100% of this threshold.

Type: number

--db / --db-path

Path to the SQLite database file used to store cost history.

Type: string Default: ~/.mcp/costs.db

--pricing-table

Path to a JSON file containing custom model pricing ($/1K tokens). Merged with the built-in table; missing models fall back to defaults.

Type: string

--default-model

Model name to attribute costs to when no model can be inferred from context.

Type: string Default: claude-sonnet-4-6

--enforce-budget

Block tool calls that would cause the session to exceed the budget alert threshold. Requires --budget-alert to be set.

Type: boolean Default: false

--http-port

Start in HTTP mode using Streamable HTTP transport instead of stdio. Useful for sharing a single cost-tracking instance across a team.

Type: number Default: disabled (uses stdio)

Pass flags via the args property in your JSON config:

config.json
{
  "mcpServers": {
    "cost-tracker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-cost-tracker-router@latest",
        "--budget-alert=2.00",
        "--enforce-budget"
      ]
    }
  }
}

Supported models and pricing

Built-in pricing table (USD per 1K tokens):

ModelInputOutput
claude-opus-4-6$0.0150$0.0750
claude-sonnet-4-6$0.0030$0.0150
claude-haiku-4-5$0.0008$0.0040
gpt-4o$0.0025$0.0100
gpt-4o-mini$0.000150$0.000600
gemini-1.5-pro$0.001250$0.005000
gemini-1.5-flash$0.000075$0.000300
gemini-2.0-flash$0.000100$0.000400

Override individual model prices with --pricing-table. All costs are estimates.

Verification

Before publishing a new version, verify the server with MCP Inspector to confirm all tools are exposed correctly and the protocol handshake succeeds.

Interactive UI (opens browser):

Terminal
npm run build && npm run inspect

CLI mode (scripted / CI-friendly):

bash
# List all tools
npx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list

# List resources and prompts
npx @modelcontextprotocol/inspector --cli node dist/index.js --method resources/list
npx @modelcontextprotocol/inspector --cli node dist/index.js --method prompts/list

# Call a read-only tool
npx @modelcontextprotocol/inspector --cli node dist/index.js \
  --method tools/call --tool-name get_session_cost

# Call record_usage with arguments
npx @modelcontextprotocol/inspector --cli node dist/index.js \
  --method tools/call --tool-name record_usage \
  --tool-arg tool_name=my_tool --tool-arg input_tokens=500 --tool-arg output_tokens=200

Run before publishing to catch regressions in tool registration and runtime startup.

Contributing

Update src/pricing.ts when new models are released. All cost calculation changes must include unit tests with known token counts and expected USD values. Routing suggestions live in src/tools/routing.ts.

Terminal
npm install && npm test

MCP Registry & Marketplace

This plugin is available on:

  • MCP Registry
  • MCP Market

Search for mcp-cost-tracker-router.

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Developer Tools View all alternatives
  • T
    Tldraw

    Draw and visually collaborate with your agents on tldraw's canvas.

    πŸ’» Developer Tools0 views
    Compare vs Tldraw β†’
  • PraisonAI logoPraisonAI

    AI Agents Framework with Self Reflection and MCP support

    πŸ’» Developer Tools1 views
    Compare vs PraisonAI β†’
  • Labelhead Artist Momentum logoLabelhead Artist Momentum

    Trending hip-hop artist momentum scores across four cultural dimensions.

    πŸ’» Developer Tools0 views
    Compare vs Labelhead Artist Momentum β†’
  • Andrea9293 MCP logoAndrea9293 MCP

    Local-first document management and semantic search for AI coding agents

    πŸ’» Developer Tools2 views
    Compare vs Andrea9293 MCP β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

npm downloads
155
Package downloads in the last 30 days.
Last commit
4mo ago
Most recent push to the default branch.
Tools exposed
15
Callable tools this server registers over MCP.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about MCP Cost Tracker Router

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "mcp-cost-tracker-router": { "command": "npx", "args": ["-y", "mcp-cost-tracker-router"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Cost Tracker Router AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-cost-tracker-router?style=directory)](https://allmcps.com/mcp/mcp-cost-tracker-router)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-cost-tracker-router"><img src="https://allmcps.com/api/badge/mcp-cost-tracker-router?style=directory" alt="MCP Cost Tracker Router on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ’»Developer Tools
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
Last updatedApr 27, 2026
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars0
GitHub Star CountTotal stargazers on GitHub representing community popularity (0 stars).
Last commit4mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Apr 27, 2026
npm downloads155/mo
Monthly npm DownloadsAverage monthly package installs recorded from npm registry statistics.
43Quality signal: Fair Β· 43/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership6/20
Documentation & tools23/30
Adoption & activity3/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

2 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage β€” this is a directional signal, not a security audit.

Critical 1High 1Medium 0Low 0

Scanned 7h ago via OSV.dev Β· @modelcontextprotocol/inspector (npm)

β˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server β†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ’» Developer Tools β†’Best MCP servers for Developers β†’Alternatives to MCP Cost Tracker Router β†’Install in Claude DesktopInstall in CursorInstall in VS Code