LLM Pricing

io.github.skakumanu由 GitHub 帳號 skakumanu 發布v1.79.1更新於 Oct 29, 2026

Real-time, drift-verified LLM pricing across 31 providers with cost+quality model routing.

已驗證Streamable HTTP可網頁執行金融資料與分析AI 與機器學習

概覽

AI 產生的概覽

LLM 價格目錄 MCP 伺服器:比較模型與 IDE 費用、依成本與品質路由任務,並記錄實際花費。

可以做什麼
  • 查詢、比較與估算 LLM 價格、效能指標、適用情境以及 AI 程式開發 IDE 訂閱費用,並可依提示詞文字預測成本
  • 為單一任務或多任務工作負載推薦或最佳化模型選擇,並檢視快取統計
  • 查詢價格歷史與趨勢,檢查價格漂移與資料品質,並匯出價格資料
  • 註冊、列出與刪除價格變動 webhook 通知
  • 記錄、匯入並分析實際 token 用量與花費,管理預算通知
  • 以自然語言向價格助理提問,列出或刪除已存對話,並取得有依據的客服回覆
適用情境
適合讓助理回答 LLM 或 AI IDE 價格問題、為工作負載挑選高性價比模型,或追蹤實際花費與價格變動。公開的價格工具不需帳號;用量統計與路由需要免費的服務金鑰。
執行需求
可使用 llm-pricing-api.fly.dev/mcp 遠端端點,或以 npx 執行 npm 套件 llm-pricing-mcp(stdio)。選用的服務金鑰 LLM_PRICING_API_KEY(以 x-api-key 傳送)僅用量、預算與調度工具需要,須註冊取得。選用的 LLM_PRICING_MCP_URL 與 LLM_PRICING_MCP_TIMEOUT_MS 用於設定橋接。需要網路存取。
安裝前請注意
服務金鑰代表你的組織,可解鎖用量、預算與調度操作,須妥善保管。記錄用量、匯入工作階段、註冊通知以及刪除對話或通知都會變更已存資料。價格通知與預算通知會傳送 webhook 到你提供的網址,預算通知還可強制阻擋該組織的調度。價格由人工維護,可能過期或被暫停提供。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LLM Pricing,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.skakumanu%2Fllm-pricing-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "llm-pricing": {
      "type": "http",
      "url": "https://llm-pricing-api.fly.dev/mcp"
    }
  }
}

README

LLM Pricing MCP Server

[CI/CD Pipeline] [License: MIT]

LLM pricing you can verify, route on, and act on: 32 MCP tools, a REST API and browser UIs over pricing data from 30 LLM providers.

Live at: https://llm-pricing-api.fly.dev · API reference: /api-docs · Swagger: /docs


What it does

  • Verified prices: every curated price is checked against a live external registry; anything drifted more than 5% is withheld, never silently served.
  • Routes, not just quotes: picks a model by cost and quality for your task.
  • Executes: the dispatch gateway runs the best eligible model on your own provider keys.
  • Tracks real spend: records usage, analyzes sessions, fires budget alerts.
  • Price alerts: webhooks on price changes, self-managed with an alert_token.
  • Local currency: optional currency / country on pricing and estimates (13 currencies).
  • Many surfaces: MCP (STDIO + HTTP), REST, chat agent, calculator / compare / history UIs, billing dashboard, FAQ (/faq), published legal pages and security statement (/terms, /privacy, /refunds, /dpa, /subprocessors, /security).
  • Customer support: a grounded support assistant (Support mode on /chat, support_chat MCP tool) that knows the FAQ, the plan catalogue and your own account, and escalates anything it cannot do to the owner with a reference.
  • Retired providers: Anyscale (2026-10)

Quick start

Claude Desktop (remote, no install): open Settings → Connectors → Add custom connector and paste:

https://llm-pricing-api.fly.dev/mcp
  • Claude Desktop ignores a url entry in claude_desktop_config.json; that file only launches local commands.
  • A connector sends no custom headers. For tools that need your service key, use the npx bridge below.

npx bridge (STDIO, no clone, no Python): add to claude_desktop_config.json:

json
{  "mcpServers": {    "llm-pricing": {      "command": "npx",      "args": ["-y", "llm-pricing-mcp"],      "env": { "LLM_PRICING_API_KEY": "<your-service-key>" }    }  }}

Run locally (Python 3.11):

bash
pip install -r requirements.txtuvicorn src.main:app --reload --port 8000   # REST + POST /mcp; STDIO server: python mcp/server.py

MCP tools

All 32 tools are listed over POST /mcp and STDIO. MCP protocol version 2024-11-05.

GroupTools
Pricing and estimatesget_all_pricing, estimate_cost, compare_costs, predict_cost, get_performance_metrics, get_use_cases, get_ide_pricing, get_pricing_export_url
Routingrecommend_model, optimize_workload, get_cache_stats
Data qualitycheck_price_drift, get_data_quality
Historyget_pricing_history, get_pricing_trends, get_telemetry
Price alertsregister_price_alert, manage_price_alert, list_price_alerts, delete_price_alert
Usage and budgetrecord_usage, get_usage_summary, analyze_session_usage, import_session_usage, register_budget_alert, list_budget_alerts, delete_budget_alert
Agent, support and dispatchask_agent, support_chat, list_conversations, delete_conversation, dispatch

Pass client (e.g. Claude Code, cursor, github copilot, cline) to recommend_model, optimize_workload, compare_costs or POST /router/recommend and the answer is restricted to models that tool can run before ranking; on the hosted MCP server it is inferred from the handshake when omitted, and an explicit value always wins. Recognised clients and the override order are in docs/MCP_QUICK_START.md.

The chat agent binds 27 of the 32 MCP tools (all except ask_agent, support_chat, get_telemetry, get_cache_stats and dispatch).


Key features

Dispatch gateway

  • Add a dispatch policy to POST /v1/chat/completions. The best eligible model runs for real and you get a dispatch_receipt with the chosen model, reason, actual cost and savings.
  • Objectives: balanced, cheapest, best_quality, lowest_latency, pinned. Failover never drops below your min_quality_score.
  • Supports stream: true (OpenAI-format SSE; the receipt arrives in the final chunk).
  • Text-only, single-choice. tools, n > 1 and image parts are rejected up front, with the feature named.
  • Also available as the dispatch MCP tool. Executable providers are listed at GET /dispatch/providers.

Stored provider keys

  • Store each provider key once per org with POST /dispatch/keys. After that, callers need only their service key.
  • Keys are AES-256-GCM-encrypted at rest and never returned; listings show only a last-4 fingerprint.
  • A per-request X-Provider-Key-<Provider> header still overrides the stored key.

Price alerts with alert_token

  • Registering a price alert returns a one-time alert_token. It is stored only as a hash and nobody can recover it.
  • View or delete your alert with no account: POST /pricing/alerts/self/view or /self/delete with the token in the JSON body, or the manage_price_alert tool.
  • Listing or deleting all alerts is operator-only.

Webhook SSRF guard

  • Webhook URLs must be public https. Private, loopback, metadata and unresolvable hosts are refused with 422 invalid_webhook_url.
  • The URL is checked at registration and again at every delivery, connecting only to the checked IP; redirects are never followed.
  • Older alerts that break the rules are kept but skipped at delivery.
  • WEBHOOK_ALLOW_PRIVATE_TARGETS is for local development only; never set it in production.

Cost estimation

  • POST /cost-estimate (one model) and POST /cost-estimate/batch (1–50 models). No key needed; requests are rate-limited.
  • predict_cost and scripts/audit_repo.py estimate the cost of a workload or a codebase's LLM call sites.

Data quality

  • GET /data-quality gives one trust score, confirmed_pct, plus counts of drift-withheld, never-priced and stale models.
  • Every price carries price_source_kind (provider or registry). check_price_drift gives per-model detail.

Usage and budget

  • POST /usage records actual spend. GET /usage/summary and GET /usage/session/{session_id} analyze it.
  • Budget alerts (POST /usage/alerts) fire a webhook at a threshold; hard_stop: true also blocks dispatch for your org.

Customer support and plans

  • Support mode on /chat and the support_chat MCP tool answer plan, billing, key, rate-limit and how-to questions only from the published FAQ (docs/FAQ.md), the plan catalogue (GET /billing/config) and, with your service key, your own account. No invented prices, policies or response times.
  • Everything outside its authority (refunds, credits, disputes, failed payments, a lost key without the current key, bug/feature/security reports, "talk to a human") becomes an escalation in the owner's operator-only queue with a reference; POST /support/escalations/status returns the owner's reply.
  • Plans describe only what is implemented: rate limit, support assistant allowance and escalation priority. Upgrade and Manage Billing work when Stripe is configured; POST /billing/key/rotate rotates a key with the current one; GET /billing/account/export downloads everything held about your organisation and POST /billing/account/delete (body {"confirm": "DELETE", "org_id": ...}) irreversibly erases it, ends any Stripe subscription and opens a refund review when you delete inside the 14-day window (v1.87.0); service keys are stored only as a SHA-256 hash; the Stripe webhook handles failed renewals (14-day grace, then the free limit), refunds and disputes, and ignores duplicate deliveries.
  • Legal pages (v1.86.0): /terms, /privacy, /refunds, /dpa, /subprocessors are generated from docs/legal/*.md (scripts/sync_legal.py), linked from the site footer, /billing and /faq, and show a draft notice until the owner turns on LEGAL_PAGES_LIVE and every placeholder is replaced. Paid checkout stays disabled until then; the Stripe customer portal is unaffected. Refunds: full within 14 days of the first payment, pro-rated after, every request reviewed by the owner via the support assistant. /security states what the service does and does not have (no SOC 2, ISO 27001 or third-party penetration test). The pre-launch list is docs/LAUNCH_CHECKLIST.md.
  • Spend: per-caller daily LLM caps by tier (anonymous strictest) under the orchestrator's global monthly ceiling; a cap hit returns a non-LLM fallback with FAQ links. Every support action leaves an operator-only, append-only record.

Orchestrator core (operator-only)

  • One place where the operator's inbound work (GitHub issues/PRs, the weekly price audit, owner requests) is accepted exactly once, routed by trigger class and owner-applied labels only, and held at human checkpoints.
  • /orchestrator/* plus an Orchestrator block on /admin: approval queue, parked runs, run log (CSV), global pause, per-workflow mode, budgets. Nothing merges, moves money or sends anything without a recorded approval.
  • The SDLC pipeline is wrapped as an owner checkpoint: the queue shows the exact /release-feature command; the PR it opens completes the run and posts one status comment on the issue.

Compliance audit (operator-only, v1.88.0)

  • A weekly (Mondays 07:00 UTC, compliance-audit.yml) and on-demand mechanical audit of the whole system: legal placeholders and the legal-live gate, Litestream coverage of every database, production secret presence (names only), version consistency, data-quality regression against the previous report, the weekly price audit, orchestrator budget, service-key hashing, Stripe reconciliation when STRIPE_AUDIT_KEY is set, and the launch checklist's "done" items. It is report-only (changes nothing audited), makes no legal-compliance claim, and opens an owner approval only when a check fails.
  • POST /audit/run, GET /audit/reports, GET /audit/reports/{id} (latest alias) and a Compliance audit panel on /admin. Reports hold counts, file and setting names and opaque prefixes, never emails, keys or Stripe ids.

Document agent (operator-only, v1.89.0)

  • Owner-requested decks, one-pagers, release briefs and status reports from a closed four-type catalogue (release_notes_brief, pricing_comparison_deck, pricing_one_pager, internal_status_report). Every figure comes from a product data call made during the generation and is recorded in a provenance manifest; every number in the text is cross-checked against it (untraceable numbers are removed and counted); each price carries its price_as_of and a status label, and models without a usable price show "price not available" and stay out of rankings and charts.
  • GET /documents/types, POST /documents/generate, GET /documents/artifacts, GET /documents/artifacts/{id} and .../download?format=html|md|pptx|docx (self-contained printable HTML, Markdown, a PowerPoint deck with native tables, native charts and speaker notes, or a Word document with native tables and numbered notes; a deck also saves as a Word handout, a one-pager has no .pptx and answers 415), plus a Documents panel on /admin. One bounded drafting call per document (claude-haiku-5-5 by default, claude-sonnet-5-5 on request) with a labelled data-only fallback; each document waits for the owner's publish approval. Nothing is sent anywhere, no MCP tool exposes it, and customer-visible behaviour is unchanged.

Access and keys

AccessWhoWhat it unlocks
PublicAnyonePricing, estimates, data quality, history, registering a price alert, the chat agent, the support assistant in general mode: 19 public MCP tools + the identity-aware support_chat
Service keyYou (free: POST /billing/signup)Usage/budget tools and endpoints, router, dispatch, /dispatch/keys, /billing/me, /billing/key/rotate, /billing/account/export, /billing/account/delete; acts only on your own org, and support_chat / POST /support/chat can describe your own account
Operator keyServer operator (MCP_API_KEY)Listing/deleting all price alerts and conversations, admin customer list and owner-side key rotation (/admin/customers/{id}/key/rotate), every /orchestrator/*, /audit/* and /documents/* route
Intake keyGitHub Actions executor (ORCHESTRATOR_INTAKE_KEY)Only POST /orchestrator/events, GET /orchestrator/runs/{id}/actions, POST …/actions/{aid}/result; it carries the workflow's owner assertion for GitHub events, so treat it as a secret
  • Send keys as x-api-key: <your-key> (MCP also accepts Authorization: Bearer <your-key>).
  • Tiers: Free 30 / Pro 120 / Enterprise 600 req/min. Full endpoint and auth map: /api-docs.

Configuration

Set via environment variables or .env. An unknown key in .env stops startup with an error naming it.

VariablePurpose
AGENT_LLM_PROVIDER / AGENT_MODELChat agent backend: anthropic (default) or openai
ANTHROPIC_API_KEY / OPENAI_API_KEYKey for the chosen agent backend
MCP_API_KEYOperator key; protected endpoints are open when unset
PROVIDER_KEY_ENCRYPTION_KEYEnables stored provider keys (unset = 503 on /dispatch/keys)
WEBHOOK_SECRETHMAC-SHA256 signing for alert webhooks
WEBHOOK_ALLOW_PRIVATE_TARGETSLocal dev only: allow http/private webhook targets
BILLING_DB_PATH / PRICING_HISTORY_DB_PATHSQLite file locations
ORCHESTRATOR_DB_PATHOrchestrator SQLite file (runs, approvals, action records, spend, settings)
ORCHESTRATOR_INTAKE_KEYSeparate credential for the GitHub Actions executor; accepted on three routes only
ORCHESTRATOR_RUN_RETENTION_DAYS / ORCHESTRATOR_IO_RETENTION_DAYSOrchestrator retention: rows (365) and redacted I/O summaries (90)
SUPPRESSION_HASH_KEYOptional pepper (secret, held outside the database) for the account-deletion marker; unset = salt-only markers; back it up (v1.89.4)
STRIPE_AUDIT_KEYRestricted read-only Stripe key (Customers, Subscriptions, Webhook Endpoints: read) for the compliance audit's Stripe reconciliation; unset = those checks report n/a (v1.88.0)
AUDIT_LLM_SUMMARY / AUDIT_SUMMARY_MODELOptional one-call executive summary of each audit report (default off; model claude-haiku-5-5); spend lands in the orchestrator ledger under compliance_audit
AUDIT_REPORT_RETENTION_DAYS / AUDIT_ESCALATION_MAX_AGE_DAYS / AUDIT_STALE_PRICE_PCT_WARN / AUDIT_DISABLED_CHECKSAudit report retention (365), escalation age warning (7 days), stale-price warning (10 %), and a comma list of check ids reported as n/a "disabled"
DOCS_DEFAULT_MODEL / DOCS_PREMIUM_MODELModels for the document writer's one drafting call (claude-haiku-5-5, and claude-sonnet-5-5 when a request sets premium); spend lands in the orchestrator ledger under document_generate (v1.89.0)
DOCS_ARTIFACT_RETENTION_DAYS / DOCS_DATA_ONLY_DEFAULTStored document artefacts are purged after this many days (30); true = templated prose and no model call unless a request says otherwise
STRIPE_SECRET_KEY / STRIPE_WEBHOOK_SECRET / STRIPE_PRICE_ID_PRO / STRIPE_PRICE_ID_ENTERPRISEPaid tiers; checkout, portal and webhook stay 503 until set, and checkout also waits for the legal pages to be in force (GET /billing/config reports checkout_disabled_reason)
LEGAL_PAGES_LIVEMarks the legal pages in force (default false). Even when true, a remaining [PLACEHOLDER] in docs/legal/ keeps the pages draft and checkout disabled
CONVERSATION_DB_PATH / CONVERSATION_RETENTION_DAYSSupport conversations are stored per organisation in this SQLite file (/app/data/conversations.db on Fly, replicated) and purged after the retention days (90; <= 0 disables). Unset path = in memory (v1.87.0)
BILLING_REFUND_WINDOW_DAYSFull-refund window quoted by /refunds and the FAQ (14); policy copy, refunds are never automatic
LITESTREAM_REPLICA_URL / LITESTREAM_ACCESS_KEY_ID / LITESTREAM_SECRET_ACCESS_KEYFly secrets (process environment, not .env) that turn on continuous replication of the four production databases; restore steps in docs/DEPLOYMENT.md
BILLING_PAST_DUE_GRACE_DAYSDays a failed renewal keeps the paid tier before the account is served at the free limit (14)
SUPPORT_ENABLEDfalse turns the support assistant into a FAQ-and-escalation fallback (default true)
SUPPORT_DAILY_CAP_ANONYMOUS_USD / _FREE_USD / _PRO_USD / _ENTERPRISE_USDPer-caller daily LLM allowance for support by tier (0.10 / 0.50 / 3.00 / 10.00)
SUPPORT_MAX_ESCALATIONS_PER_DAYEscalations an identified customer may open per day (3; anonymous callers get 1)
SUPPORT_FALLBACK_PRICE_PER_1M_IN_USD / SUPPORT_FALLBACK_PRICE_PER_1M_OUT_USDPrice a support turn when AGENT_MODEL is not in the catalogue (3.0 / 15.0)

Full list: src/config/settings.py. Production settings: docs/DEPLOYMENT.md.


Development and tests

bash
pytest tests/ -q
  • 4117 passing tests, CI/CD on every PR (test → lint → bandit → OSV → gitleaks → deploy); CodeQL and Dependabot run as additional scanners
  • Git Flow: feature/* → develop → master. See docs/CONTRIBUTING.md.
  • Internals, services, data stores and CI: docs/ARCHITECTURE.md.
  • Deploys to Fly.io from master when all CI gates pass: docs/DEPLOYMENT.md.

Links

來源:README.md,提交 86ffba4

工具

29

get_all_pricing

Get current pricing for all LLM models from all providers

輸入參數countrycurrency

estimate_cost

Estimate the cost of using a specific LLM model

輸入參數countrycurrencymodel_name必填input_tokens必填output_tokens必填

compare_costs

Compare costs for multiple LLM models

輸入參數countrycurrencymodel_names必填input_tokens必填output_tokens必填

get_performance_metrics

Get performance metrics (throughput, latency, context window) for models

輸入參數providerinclude_cost

get_use_cases

Get recommended use cases and strengths for LLM models

輸入參數countrycurrencyprovider

get_telemetry

Get MCP server telemetry and usage statistics including tool usage, response times, and error rates

輸入參數limitinclude_details

get_pricing_history

Query historical pricing snapshots recorded over time. Use this to look up past prices for a model or provider, or to see how prices have changed over a given number of days.

輸入參數dayslimitprovidermodel_name

register_price_alert

Register a webhook URL to receive notifications when a model's price changes by more than a specified percentage. Optionally scope the alert to a specific provider or model. Returns the alert ID.

輸入參數url必填providermodel_namethreshold_pct

list_price_alerts

List all registered price-change webhook alerts with their IDs and settings.

無需輸入參數。

delete_price_alert

Delete a registered price-change alert by its ID.

輸入參數alert_id必填

get_pricing_export_url

Generate a download URL for the pricing history export. Returns a URL the user can open in their browser to download snapshot history as CSV (for spreadsheets) or JSON (for code). Use this when the user asks to export, download, or save pricing data.

輸入參數dayslimitformatprovidermodel_name

list_conversations

List stored chat conversation sessions with their IDs, last-updated timestamp, turn count, and a preview of the most recent user message. Use this when the user asks to see their past conversations or chat history.

輸入參數limit

delete_conversation

Delete a specific chat conversation by its ID. Use when the user asks to delete, clear, or remove a past conversation. Use list_conversations first to find the conversation ID.

輸入參數conversation_id必填

get_ide_pricing

Get subscription pricing for AI coding IDE tools: GitHub Copilot, Cursor, Windsurf, Claude.ai, JetBrains AI, Amazon Q Developer, and Tabnine. Returns monthly subscription cost, inline completion support, context window, and per-tool strengths. Use this when the user asks to compare IDE AI tools, subscription-based coding assistants, or wants to know which IDE AI fits their budget.

輸入參數providerinline_onlymax_monthly

predict_cost

Predict the real cost of an LLM call from your actual prompt text — no need to know token counts in advance. Counts tokens locally, infers the task type (or accepts one explicitly), estimates output length from empirical I/O profiles, and returns all models ranked cheapest-first with effective cost after prompt-cache savings. Also surfaces the best quality-per-dollar pick. Use this before making any LLM API call to avoid surprise bills.

輸入參數top_nprompt必填task_typerequire_visioncache_hit_ratiomin_context_tokensrequire_function_calling

optimize_workload

Optimise a multi-task LLM workload by assigning the cheapest qualifying model to each task instead of running everything through one model. Takes a list of workloads (task type + monthly volume + optional quality floor and capability requirements) and returns a per-task model allocation, the total monthly cost, and the saving versus the best single-model deployment. If a monthly budget is given, leftover headroom is spent on the most cost-efficient quality upgrades. Use when the user asks how to cut LLM spend across several task types, or whether tiered model routing is worth it.

輸入參數workloads必填min_quality_scoremonthly_budget_usd

recommend_model

Recommend the optimal LLM model from a free-text description of your use case — no need to already know the routing engine's task_type vocabulary. Classifies the description into a task type, then runs it through the same routing engine behind /router/recommend (live pricing + benchmark quality, hard filters for cost/quality/context window, scored by quality-per-dollar). Returns the best match plus up to 3 alternatives. Read-only — use predict_cost first if you also want per-model cost estimates for an actual prompt, and optimize_workload if you have several distinct task types to route at once.

輸入參數countrycurrencytask_typedescription必填ide_contextavg_input_tokensavg_output_tokensmin_quality_scoremin_context_windowmonthly_budget_usdprefer_low_latencypreferred_provider另有 3 個

check_price_drift

Audit this server's own pricing data against an external reference registry. Prices here are hand-maintained and go stale silently; a price that disagrees with the registry by more than the threshold is automatically withheld from serving the moment it's detected, not just when this tool runs. This reports what's currently withheld and why. The price value itself is never overwritten by the registry. Use when the user asks whether the pricing data is accurate or up to date, or wants to audit a specific provider's rates.

輸入參數limitproviderthreshold_pct

get_data_quality

Report an aggregate accuracy summary for the pricing catalogue: what percentage of models have a confirmed, fresh price, how many are currently withheld due to price drift, how many are newly discovered and not yet priced, and how many confirmed prices are over 90 days old. A single trust signal, distinct from check_price_drift which lists individual disputes. Use when the user asks how accurate or trustworthy the pricing data is, overall.

無需輸入參數。

get_cache_stats

Report process-lifetime hit/miss counts, total lookups, and hit rate for the ~5-minute recommendation cache, separately for the recommend_model tool and POST /router/recommend (never combined). Server-operations introspection for confirming the cache is reducing recomputation in production, not a pricing question. Counts reset on process restart; reading them never changes them.

無需輸入參數。

record_usage

Record actual token usage for a completed LLM call. Cost is computed server-side from current pricing, never trusted from the caller — this is the 'actual spend' counterpart to estimate_cost's hypothetical numbers. Usage is attributed to your org. Resubmitting the same request_id for the same org is a no-op. Use when the user wants to log or track real LLM spend, not just estimate it. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); org_id defaults to, and must match, that key's org.

輸入參數org_idmodel_name必填request_idsession_idoccurred_atinput_tokens必填output_tokens必填

get_usage_summary

Get a summary of actual recorded LLM spend: total cost, request count, and breakdowns by model and provider, from usage events previously logged via record_usage. Use when the user asks what they've actually spent, as opposed to a hypothetical cost estimate. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); org_id defaults to, and must match, that key's org.

輸入參數daysorg_id

analyze_session_usage

Analyze one specific session's actual recorded LLM usage (tagged via record_usage's session_id) on demand: total input/output tokens, total actual cost, and a per-model breakdown if more than one model was used. Also runs the session's own observed token pattern through the same routing engine behind recommend_model / POST /router/recommend to produce a grounded recommendation — or confirm the current choice is already optimal — with the estimated dollar savings or increase versus this session's actual cost. Returns has_data: false with no recommendation if the session_id has no recorded usage. Advisory only — never switches or reroutes anything. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); org_id defaults to, and must match, that key's org.

輸入參數org_idsession_id必填

import_session_usage

Bulk-import a completed session's usage in a single call — the retroactive counterpart to record_usage, for when a session wasn't instrumented live. Use when a calling agent (e.g. VS Code Copilot Chat) already has a session's turn-by-turn history in its own local store and wants this server to report on it exactly as if it had been tracked live. Accepts a list of entries under one shared session_id; each entry resolves its input and output tokens independently, either from exact counts when known or by estimating from raw turn text using this server's existing token counter. Cost is always computed server-side from current pricing, never trusted from the caller. A malformed entry (no usable tokens/text on one side, or an unresolvable model_name) is reported as its own per-entry failure and does not fail the rest of the batch. Idempotent like record_usage — resubmitting the same entries (same request_id, or the same session_id/model/occurred_at/token-or-text when request_id is omitted) is a no-op. Recorded usage is then readable via analyze_session_usage and GET /usage/session/{session_id}. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); org_id defaults to, and must match, that key's org.

輸入參數org_identries必填session_id必填

register_budget_alert

Register a webhook URL to receive notifications when actual recorded spend (from record_usage) crosses a USD threshold within a rolling window. The alert monitors your org's spend. Fires at most once per period_days while spend stays over threshold. Returns the alert ID. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); org_id defaults to, and must match, that key's org.

輸入參數url必填org_idperiod_daysthreshold_usd必填

list_budget_alerts

List your org's registered budget-spend webhook alerts with their IDs and settings. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); only alerts for that key's org are returned.

無需輸入參數。

delete_budget_alert

Delete one of your org's registered budget-spend alerts by its ID. Requires your service API key on the MCP connection (x-api-key or Authorization: Bearer); another org's alert ID reads as not found.

輸入參數alert_id必填

ask_agent

Ask the LLM Pricing AI agent a question in natural language. Use for complex queries about pricing, model recommendations, cost optimisation advice, or anything that benefits from multi-step reasoning.

輸入參數message必填autonomousconversation_id

版本歷史

3
  1. v1.79.1最新Oct 29, 2026
  2. v1.73.10Oct 25, 2026
  3. v1.73.2Oct 19, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分