Costrack Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Costrack Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Lightweight MCP server that gives any AI agent or developer instant cost tracking, spend analysis, budget enforcement, and model cost optimization for LLM operations.
CosTrack sits between simple price-lookup tools and full observability platforms. It's an MCP-native cost control layer — log costs, get reports, check budgets, compare models — all via tool calls.
| Tool | Description |
|---|---|
cost_log | Record a cost event for an LLM call or agent operation |
cost_report | Generate cost summary with breakdowns by model, agent, task |
cost_compare | Compare costs side-by-side for models, agents, or periods |
budget_check | Check spend vs budget with end-of-period projection |
cost_estimate | Estimate cost for planned calls with cheaper alternatives |
pricing_table | Get current pricing data for 17+ supported models |
Model names are automatically normalized — use aliases like sonnet, gpt-4o, haiku etc.
Add to your MCP server configuration:
{
"mcpServers": {
"costrack": {
"url": "https://costrack-mcp.<your-subdomain>.workers.dev/mcp"
}
}
}Log a cost event:
cost_log(model: "claude-sonnet-4", input_tokens: 1500, output_tokens: 800, agent_id: "my-agent")
→ { cost_usd: 0.0165, running_session_total: 1.23 }Check budget:
budget_check(budget_usd: 100, scope: "all", period: "30d")
→ { current_spend_usd: 65.0, status: "PROJECTED_OVERAGE", projected_end_of_period_spend_usd: 130.1 }Estimate before calling:
cost_estimate(model: "claude-opus-4", estimated_input_tokens: 5000, estimated_output_tokens: 2000)
→ { cost_per_call_usd: 0.225, alternatives: [{ model: "anthropic/claude-sonnet-4", savings_percent: 90.0 }] }sonnet, claude-sonnet-4, anthropic/claude-sonnet-4 all resolve to the same modelidempotency_key to prevent duplicate cost logginghard_limit_usd to get alerts when spend exceeds threshold (fail-safe, not fail-stop)cost_estimate recommends cheaper models in same capability tiernpm install -g wrangler)# Install dependencies
npm install
# Login to Cloudflare
wrangler login
# Create KV namespace
wrangler kv:namespace create COSTRACK_EVENTS
# Update wrangler.toml with the returned namespace ID
# Deploy
wrangler deploynpm run devnpm run buildsrc/pricing/pricing-table.ts)Edit wrangler.toml to set:
COSTRACK_EVENTS KV namespace ID (Rich fills in after wrangler kv:namespace create)costrack-mcp/
├── src/
│ ├── tools/ # 6 tool implementations
│ ├── pricing/ # Pricing data + model aliases
│ ├── normalize/ # Model name normalization
│ ├── storage/ # Durable Object + KV + DO client
│ ├── utils/ # Cost calculator, tier check
│ ├── types/ # Shared TypeScript types
│ ├── index.ts # MCP server core
│ └── worker.ts # Cloudflare Workers entry point
├── wrangler.toml # CF Workers config
├── package.json
├── tsconfig.json
└── README.mdMIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.