Budgetary: estimate token spend
Pre-flight token-spend estimate (range, scenario, confidence) for a coding task, or an abstention.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@budgetary/mcpclaude mcp add budgetary-estimate-token-spend -e 'BUDGETARY_API_KEY=<your budgetary_api_key>' -e 'BUDGETARY_HOST=<BUDGETARY_HOST>' -- npx -y @budgetary/mcp@0.13.0
{
"mcpServers": {
"budgetary-estimate-token-spend": {
"command": "npx",
"args": [
"-y",
"@budgetary/mcp@0.13.0"
],
"env": {
"BUDGETARY_API_KEY": "<your budgetary_api_key>",
"BUDGETARY_HOST": "<BUDGETARY_HOST>"
}
}
}
}
متغيرات البيئة
BUDGETARY_API_KEYإلزامي سري Budgetary API key (bg_live_ or bg_test_ prefix). Get one at https://budgetary.tools.BUDGETARY_HOSTOptional tag naming the MCP host this server runs under — e.g. claude-code, cursor, codex, copilot. It labels each estimate with where it came from, and an explicit value overrides the host name the MCP handshake reports. Free-form; defaults to "mcp" when unset.
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
Budgetary clients
Budgetary tells you how many tokens an LLM query will cost — before you run it.
Budgetary is a hosted API at https://api.budgetary.tools that returns probabilistic pre-inference token-spend estimates for LLM queries. This repository holds the open-source clients that talk to it: language SDKs and editor plugins.
Quick example
import { BudgetaryClient } from "@budgetary/sdk";
const budgetary = new BudgetaryClient({ apiKey: process.env.BUDGETARY_API_KEY! });
const estimate = await budgetary.estimate("Summarize the attached PDF in three bullets.");
The SDK in this release is a stub — the call above illustrates the shape of the API surface, not a working implementation.
Install
See docs/installation.md for per-client setup:
- TypeScript / JavaScript SDK —
@budgetary/sdkon npm - Python SDK —
budgetaryon PyPI - VS Code extension (dashboard)
- Claude Code plugin
- Codex plugin
API
Bearer-auth HTTP API at https://api.budgetary.tools. The wire contract is published at docs/api-contract.md.
Status
Early access. The hosted API is live, but client interfaces may change between releases until they reach 1.0. Pin exact versions in production.
License
Apache-2.0. Copyright Budgetary.
الأسئلة الشائعة
ما هو Budgetary: estimate token spend؟
Pre-flight token-spend estimate (range, scenario, confidence) for a coding task, or an abstention.
كيف أثبّت Budgetary: estimate token spend؟
يعمل على جهازك. في Claude Code: claude mcp add budgetary-estimate-token-spend -e 'BUDGETARY_API_KEY=<your budgetary_api_key>' -e 'BUDGETARY_HOST=<BUDGETARY_HOST>' -- npx -y @budgetary/mcp@0.13.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج Budgetary: estimate token spend إلى مفتاح API؟
نعم. يتطلب BUDGETARY_API_KEY، وتضبطها في إعداداته.
هل Budgetary: estimate token spend مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص Apache-2.0.
من يصون Budgetary: estimate token spend؟
ينشره thriftell. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.