@vk0/agent Cost Mcp
About
Local-first Claude Code cost analyzer. Parses JSONL session logs to surface per-tool spend, daily trends, and optimization hints.
Details
- Author
- vk0dev
- Downloads
- 4,312
- Categories
- AI
Jump to
- Cost queries: get_session_cost, get_tool_usage, get_cost_trend, get_subagent_tree
- Optimization analytics: get_tool_roi, suggest_optimizations, detect_cost_anomalies
- Predictive tools: get_cost_forecast, estimate_run_cost
- Configuration tools: configure_budget, set_monitor_webhook
- Operates entirely locally on JSONL session logs from Claude Code
- Privacy-preserving with zero cloud dependencies
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
@vk0/agent Cost McpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install by adding an npx-based MCP server to your client configuration (Claude Desktop, Claude Code CLI, Cursor, or Cline). No global install required. Once configured, ask the agent “What tools does agent-cost expose?” to see the eleven available tools. Operates on existing session logs at ~/.claude/projects/.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"@vk0/agent cost mcp": {
"agent-cost": {
"command": "npx",
"args": [
"-y",
"@vk0/agent-cost-mcp"
]
}
}
}
}
McpServers
{
"agent-cost": {
"command": "npx",
"args": [
"-y",
"@vk0/agent-cost-mcp"
]
}
}
Quick visibility (native /cost, ccusage) vs Cost Guard forensics (@vk0/agent-cost-mcp)
Claude Code and ccusage already give you useful cost visibility. @vk0/agent-cost-mcp is for the next layer: forensics, attribution, and guardrails.
Use native /cost or ccusage when
- you want a quick current-session total or statusline number
- you need daily or period usage dashboards or burn-rate summaries
- you are looking for a polished human-facing monitoring UX
- nothing to configure
Use @vk0/agent-cost-mcp when
- you want per-tool cost share and ROI ranking with get_tool_roi and get_tool_usage
- you need parent↔subagent cost attribution across branches with get_subagent_tree
- you want anomaly detection against your local baseline with detect_cost_anomalies
- you need forward-looking spend estimates from get_cost_forecast or estimate_run_cost
- you want agent-readable budget caps and hard-stop guardrails via configure_budget
- you need machine-readable next-action suggestions and signed webhook alerts via suggest_optimizations and set_monitor_webhook
Best together
Use native /cost or ccusage for quick visibility; reach for @vk0/agent-cost-mcp when the next question is: which tool, subagent, or branch burned the budget, what happens if the run continues, and what should the agent do next? — answered locally from JSONL, machine-readable.
This package does not replace invoices, org-wide billing systems, or live runtime introspection. It is a local MCP surface for structured cost forensics and guardrails from Claude Code session logs.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
