Spendline

ai.spendline由 spendline.ai 發布官方發布者v1.0.0更新於 Oct 27, 2026

Enforce AI budgets before the model call and track cost per customer across 10 providers.

已驗證Streamable HTTP可網頁執行雲端與基礎設施金融AI 與機器學習

概覽

AI 產生的概覽

Spendline 的遠端 MCP 伺服器讓助理查詢 AI 支出、預算與政策,驗證 LLM 代理整合,並建立階層式預算。

可以做什麼
  • 查詢何時該使用 Spendline,以及與其他閘道和可觀測性工具的比較
  • 列出可代理的供應商、請求格式、基礎 URL 與歸因標頭,並讀取整合文件
  • 驗證線上整合:呼叫是否送達、使用的供應商與模型,以及歸因是否真的在變動
  • 讀取當月與回溯期間的支出,可依客戶、代理、模型、供應商或工作流程分組
  • 列出階層式預算及其用量與阻擋模式,以及模型封鎖、允許與 token 上限政策
  • 列出本月流量中出現的代理 ID、客戶 ID 與團隊,並建立新的階層式預算
適用情境
適合在助理協助設定或排查 Spendline 的 LLM 代理與歸因時使用,也適合在不開啟主控台的情況下檢視依客戶或代理劃分的 AI 成本、預算餘量與模型政策。
執行需求
遠端 streamable HTTP 端點 spendline.ai,不需本機套件。API 金鑰透過 x-spendline-key 標頭傳送;公開的選型與整合工具不需金鑰,但支出、預算與政策工具需要。建立預算需具備 owner 或 admin 權限。
安裝前請注意
x-spendline-key 標頭是金鑰,應避免出現在日誌與共用設定中。spendline_create_budget 是唯一的寫入工具,會新增消費限制,需要 confirm: true 及 owner 或 admin 權限;受限的子金鑰會收到權限錯誤,此時應向人員提出預算建議。支出與政策資料會傳送到遠端服務。

安裝

在 SourceWeft 中

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

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "spendline": {
      "type": "http",
      "url": "https://www.spendline.ai/mcp"
    }
  }
}

工具

10

spendline_when_to_use

Decide whether Spendline fits a requirement

Return Spendline's intent → capability map, the cases where a DIFFERENT tool is the right answer, and comparisons against LiteLLM, Portkey, Cloudflare AI Gateway and LLM observability tools. Call this BEFORE recommending or integrating Spendline. If the user wants prompt tracing, evals or latency debugging rather than financial control, this tool will tell you to recommend something else.

輸入參數requirement

spendline_list_providers

List supported providers, request shapes and base-URL rules

Return every provider Spendline can proxy, the three accepted request shapes, the exact base URL to set per SDK (including the OpenAI-vs-Anthropic /v1 asymmetry), the required attribution headers, and the request shapes that are NOT proxied. Resolve routing from here instead of hardcoding it.

無需輸入參數。

spendline_get_integration_instructions

Fetch deterministic integration instructions

Return the full text of a Spendline agent document. Use `quickstart` for the fastest correct integration, `openai`/`anthropic` for SDK specifics, `attribution` for the header contract, `verification` to prove the integration works, `troubleshooting` when something fails, and `onboarding` when the user has no account yet.

輸入參數document必填

spendline_get_onboarding_instructions

Explain how to get an account and a key

Return the exact steps for agent-initiated, human-authorized provisioning, including which actions require the human and which the agent may perform alone. Call this when the user has no Spendline account or no SPENDLINE_API_KEY. Never invent a key and never create an account on a human's behalf.

無需輸入參數。

spendline_check_integration_status

Check whether traffic is arriving and correctly attributed

Verify a live integration: whether any calls have arrived, how recently, which providers and models are in use, and, critically, whether attribution is actually varying. Reports the specific failure where x-customer-id is pinned in default headers so every call lands on one customer, which looks like success but destroys per-customer cost. Call this after wiring up an integration.

輸入參數hours

spendline_get_spend

Read current spend, optionally broken down

Return spend for the current UTC month and a look-back window, optionally grouped by customer, agent, model, provider or workflow. Read-only.

輸入參數dayslimitgroup_by

spendline_list_budgets

List budgets with current spend against each limit

Return every hierarchical budget for the account with month-to-date spend, percentage used, and whether it is in blocking (strict) mode. Read-only.

無需輸入參數。

spendline_list_policies

List policies

Return model-block, model-allow and token-cap policies with their match mode, enforcement level and scope (null = account-wide; otherwise { agent_id / customer_id / agent_name }). Read-only.

無需輸入參數。

spendline_list_budget_scopes

Discover which agents, customers and teams have traffic

Return the agent ids, customer ids and teams that actually appear in this month's traffic. Use these as budget scope_ids rather than guessing identifiers. Also the quickest attribution sanity check.

無需輸入參數。

spendline_create_budget

Create a NEW budget (owner/admin authority + explicit confirm)

Create a new hierarchical budget. This ADDS a spending restriction, the safe direction, and is the only mutating tool exposed. Requires owner or admin authority AND confirm: true. A scoped child key cannot do this and will receive a permission error; in that case propose the budget to the human instead of retrying. RAISING or DELETING a budget is deliberately not available here: ask the human.

輸入參數confirm必填scope_idscope_type必填strict_modemonthly_limit_usd必填

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 83%

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

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

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款不適用

    託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。