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。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。