
Llmkit
io.github.smigolsmigolPublished by GitHub account smigolsmigolv0.4.10Updated Oct 25, 2026
AI cost tracking: 11 tools for spend, budgets, and Claude Code + Cursor + Cline costs
Overview
A local MCP server that lets an assistant inspect AI coding-session costs and, with an LLMKit key, query spend, budgets, keys and service health.
- What you can do
- Inspect local coding sessions: read supported Claude Code sessions and Cline task data to see what agents cost, without an LLMKit key. Query gateway spend and budgets: check spend, budget state and sessions through the LLMKit gateway when a key is configured. Check keys and service health: look up API keys and gateway service status. Estimate costs from a bundled pricing catalog snapshot rather than live provider quotes.
- When to use it
- Useful when you want an assistant to report what Claude Code, Cursor or Cline sessions cost, or to check spend and budget status against an existing LLMKit gateway account. Local inspection works without an account; gateway queries need an existing key.
- Requirements
- Runs locally over stdio, typically started with npx from the npm package, so Node.js is needed. The LLMKIT_API_KEY environment variable is optional and only enables the gateway tools; local tools work without it. LLMKIT_PROXY_URL optionally overrides the default hosted proxy. Account creation and key management are currently unavailable, so an existing key is required for gateway features.
Installation
In SourceWeft
- Open Llmkit in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Measure what your AI agents cost. Stop requests before they exceed a budget.
[CI] [PyPI] [npm] [OpenSSF Scorecard] [OpenSSF Best Practices] [MIT license]
Website | Docs | Pricing API | Architecture | Security | Assurance case
LLMKit is an open-source AI gateway and SDK suite for cost attribution, budget admission, and request evidence. The gateway reserves estimated spend before provider dispatch. It rejects requests that cannot fit the active budget, then settles admitted reservations to actual usage when the response completes.
The repository also ships local tracking surfaces that do not require an LLMKit account or proxy.
Choose a surface
Quick start
Local Python tracking
The transport reads provider usage metadata and estimates cost from the bundled pricing catalog. It does not send tracking data to LLMKit.
Zero-code CLI tracking
Use -v for per-request output or --json for machine-readable results.
Gateway mode (existing key)
Gateway examples require an existing LLMKit API key. Account creation and key management are temporarily unavailable while the authenticated service is restored. If you do not already have a key, use one of the local tracking paths above.
The budget path
The control path is built around three boundaries:
- Atomic admission: a Durable Object owns reservation state for each budget scope. Concurrent requests cannot spend the same remaining balance.
- Dispatch-aware idempotency: deterministic failures before dispatch release the key. After provider dispatch may have occurred, failures remain terminal to avoid duplicate spend.
- Bounded responses: non-streaming bodies and individual SSE frames have explicit byte limits. LLMKit cancels upstream reads when a limit is exceeded.
Request receipts bind the admission decision, provider attempt, settlement, and analytics handoff with stable identifiers. Database writes use an outbox, so an analytics outage does not silently erase budget evidence.
MCP server
Five local tools inspect supported Claude Code sessions and Cline task data without an LLMKit key.
Six gateway tools query spend, budgets, keys, sessions, and service health when LLMKIT_API_KEY
contains an existing key. Together they expose 11 tools.
Pricing data
The pinned catalog is a bundled reference snapshot, not a live quote. One source file,
packages/shared/pricing.json, records the snapshot date and
generates the TypeScript, Python, and MCP tables. CI rejects drift between the source and generated
files. The public site renders only populated provider tables and displays the source date.
The public comparison endpoint requires no account:
The endpoint prices only the exact model keys supplied by the caller. It does not search for or recommend the cheapest model. Pricing is an estimate, not a provider invoice. Provider billing rules, model modality, and catalog freshness remain part of the error boundary.
Evidence and current boundary
See STAGING_PROOF.md for the isolated hosted proof contract. It deliberately refuses production targets and dirty worktrees.
Project policy and design
Development
Run the Worker locally with development-only bindings:
Generic deploy commands are intentionally omitted. Staging and production use separate guarded scripts with explicit target confirmation.
Security
Provider credentials are encrypted with AES-256-GCM using a random IV and owner/provider-bound additional authenticated data. LLMKit API keys are hashed before storage. CI includes secret scanning, static analysis, dependency review, CodeQL, and package provenance checks.
Read the security policy and architecture and the machine-readable
Security Insights snapshot. Please report vulnerabilities through
GitHub private vulnerability reporting
or email [email protected].
License
Source: README.md at commit fc92e59
Tools
0Version history
1- v0.4.10LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts