Real-time cost awareness for MCP agent workflows
MCPpedia last refreshed this data
io.github.dbsectrainer/mcp-cost-tracker-router is an MCP server that real-time cost awareness for MCP agent workflows. Its tool list has not been published yet over stdio and http, requires no API key, and scores 89/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"cost-tracker": {
"args": [
"-y",
"mcp-cost-tracker-router@latest"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Real-time cost awareness for MCP agent workflows
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y 'mcp-cost-tracker-router' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked mcp-cost-tracker-router against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in ai-ml / developer-tools
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Manage Supabase projects — databases, auth, storage, and edge functions
MCP server for using the GitLab API
A cross-platform desktop application for managing AI Agents and MCP Servers. 一款用于管理AI智能体与MCP服务器的跨平台桌面应用程序。
MCP Security Weekly
Get CVE alerts and security updates for io.github.dbsectrainer/mcp-cost-tracker-router and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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
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-router | Proxy-based trackers (Helicone, LLMonitor, etc.) | |
|---|---|---|
| Token counting | Offline via js-tiktoken — no network call | Counted server-side after traffic is proxied |
| Data residency | Local SQLite only | Prompts + responses pass through vendor servers |
| Model routing | Built-in suggest_model_routing tool | Rarely included; usually a separate paid tier |
| Multi-provider | Claude, OpenAI, Gemini in one pricing table | Often single-provider or requires separate setup |
| Uptime dependency | None — fully offline | Breaks 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.
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.
Add the following config to your MCP client:
{
"mcpServers": {
"cost-tracker": {
"command": "npx",
"args": ["-y", "mcp-cost-tracker-router@latest"]
}
}
}
To set a session budget alert:
{
"mcpServers": {
"cost-tracker": {
"command": "npx",
"args": ["-y", "mcp-cost-tracker-router@latest", "--budget-alert=5.00"]
}
}
}
Amp · Claude Code · Cline · Cursor · VS Code · Windsurf · Zed
Enter the following in your MCP client to verify everything is working:
How much has this session cost so far?
Your client should return a token and USD cost summary for the current session.
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 des