
Llmkit
io.github.smigolsmigol由 GitHub 帳號 smigolsmigol 發布v0.4.10更新於 Oct 25, 2026
AI cost tracking: 11 tools for spend, budgets, and Claude Code + Cursor + Cline costs
概覽
本機 MCP 伺服器,讓助理查看 AI 編碼工作階段成本,並在設定 LLMKit 金鑰後查詢花費、預算、金鑰與服務健康狀態。
- 可以做什麼
- 檢查本機編碼工作階段:讀取支援的 Claude Code 工作階段與 Cline 任務資料,了解代理成本,不需 LLMKit 金鑰。查詢閘道花費與預算:設定金鑰後透過 LLMKit 閘道查看花費、預算狀態與工作階段。檢查金鑰與服務健康:查詢 API 金鑰和閘道服務狀態。依內建定價目錄快照估算成本,而非供應商即時報價。
- 適用情境
- 適合讓助理報告 Claude Code、Cursor 或 Cline 工作階段的成本,或針對既有的 LLMKit 閘道帳戶查看花費與預算狀態。本機檢查不需帳戶;閘道查詢需要既有金鑰。
- 執行需求
- 透過 stdio 在本機執行,通常以 npx 從 npm 套件啟動,因此需要 Node.js。LLMKIT_API_KEY 環境變數為選用,僅用於啟用閘道工具;本機工具不需它。LLMKIT_PROXY_URL 可覆寫預設的託管代理位址。帳戶建立與金鑰管理目前無法使用,閘道功能需既有金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Llmkit,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 fc92e59
工具
0版本歷史
1- v0.4.10最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分