llmkit-mcp-server
This MCP server provides AI cost tracking and budget management across Claude Code, Cline, Cursor, and Claude Desktop, supporting 11 LLM providers via two sets of tools.
Proxy Tools (API Key Required)
Usage stats: Query total spend, request counts, top models, and cache hit rates for today, week, or month
Cost breakdowns: Analyze costs grouped by provider, model, session, or day
Budget status: Check budget limits and remaining balances
Session summaries: Review recent proxy sessions with cost, duration, and models used
API key management: List all keys with status and creation dates
Health check: Ping the proxy and measure response time
Local Tools (No API Key Needed)
Current session cost: Aggregate real-time costs across all detected AI coding tools (Claude Code, Cline)
Project overview: View cumulative costs ranked by spend across all projects
Cache savings: Analyze how much prompt caching has saved you
Monthly forecast: Project monthly spending and compare against Claude Max subscription cost
Subagent attribution: Break down costs by subagent within a Claude Code session
Additionally, a SessionEnd hook automatically logs session costs when Claude Code exits. Data is auto-detected and aggregated from Claude Code, Cline (VS Code, Cursor, Windsurf), WSL installations, and remote VS Code/Cursor Server extensions.
Automatically detects and aggregates cost data from AI coding tools used within VSCodium, offering insights into session costs, project spending, and prompt caching savings.
@f3d1/llmkit-mcp-server
AI cost tracking for Claude Code, Cline, Cursor, and Claude Desktop. 11 tools for spend queries, budgets, local session costs, and agent attribution across 11 LLM providers.
Part of LLMKit, an open-source API gateway with cost tracking and budget enforcement.
Quick start
Add to your .mcp.json (Claude Code) or .cursor/mcp.json (Cursor):
{
"mcpServers": {
"llmkit": {
"command": "npx",
"args": ["@f3d1/llmkit-mcp-server"],
"env": {
"LLMKIT_API_KEY": "llmk_your_key_here"
}
}
}
}The local tools (llmkit_local_*) work immediately with no API key. They auto-detect Claude Code, Cline, and Cursor data on your machine. For the proxy tools, create a free key at the dashboard.
Related MCP server: Cost Explorer MCP Server
Tools
Proxy tools (need API key)
Tool | What it does |
| Spend, requests, top models for a period |
| Costs grouped by provider, model, session, or day |
| Budget limits and remaining balance |
| Recent sessions with cost, duration, models |
| All keys with status and creation date |
| Proxy ping with response time |
Local tools (no key needed)
Auto-detect installed AI coding tools and aggregate data from all of them.
Tool | What it does |
| Current session cost across all detected tools |
| Cumulative cost across all projects and sessions |
| Prompt caching savings analysis |
| Monthly projection vs Max subscription |
| Subagent cost attribution (Claude Code) |
SessionEnd hook
Auto-log session costs when Claude Code exits:
{
"hooks": {
"SessionEnd": [
{
"type": "command",
"command": "npx @f3d1/llmkit-mcp-server --hook"
}
]
}
}Environment variables
Variable | Required | Description |
| No | API key for proxy tools. Local tools work without it. |
| No | Proxy URL (defaults to hosted service) |
| No | Override Cline data directory path |
Supported tools
The local tools detect data from:
Claude Code (
~/.claude/projects/)Cline (VS Code, Insiders, VSCodium, Cursor, Windsurf globalStorage)
WSL installations (scans all distros via UNC paths on Windows)
VS Code Server / Cursor Server (remote SSH/WSL extensions)
License
MIT
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/smigolsmigol/llmkit-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server