io.github.jeff-atriumn/tokencost-dev

السجل الرسمي الذكاء الاصطناعي والوكلاء

LLM pricing oracle — model lookup, cost estimation, and comparison via LiteLLM

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package tokencost-dev
Claude Code
claude mcp add tokencost-dev -- npx -y tokencost-dev@0.1.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "tokencost-dev": {
            "command": "npx",
            "args": [
                "-y",
                "tokencost-dev@0.1.3"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. tokencost
  2. Install in 30 seconds
  3. Tools
  4. Docs
  5. License

tokencost

Ask your AI assistant "how much does GPT-4o cost?" — get an instant, accurate answer.


Install in 30 seconds

Claude Code:

claude mcp add tokencost-dev -- npx -y tokencost-dev

Then ask: "How much would 1M input tokens cost on claude-sonnet-4-5?"

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "tokencost-dev": {
      "command": "npx",
      "args": ["-y", "tokencost-dev"]
    }
  }
}

No API keys. No accounts. No configuration files. Pricing data is fetched from the LiteLLM community registry and cached locally for 24 hours.

Tools

get_model_details

Look up pricing, context window, and capabilities for any model. Fuzzy matching means "sonnet 4.5" works just as well as "claude-sonnet-4-5-20250514".

> "What are Claude Sonnet 4.5's pricing and capabilities?"

Model: claude-sonnet-4-5
Provider: anthropic | Mode: chat

Pricing (per 1M tokens):
  Input:  $3.00
  Output: $15.00

Context Window:
  Max Input:  200K
  Max Output: 8K

Capabilities: vision, function_calling, parallel_function_calling
calculate_estimate

Estimate cost for a given number of input and output tokens.

> "How much will 1000 input + 500 output tokens cost on Claude Sonnet 4.5?"

Cost Estimate for claude-sonnet-4-5

  Input:  1K tokens × $3.00/1M  = $0.003000
  Output: 500 tokens × $15.00/1M = $0.007500
  ─────────────────────────────
  Total:  $0.0105
compare_models

Find the most cost-effective models matching your requirements.

> "What are the cheapest OpenAI chat models?"

Top 2 most cost-effective models (provider: openai) (mode: chat):

1. gpt-4o-mini
   Provider: openai | Mode: chat
   Input: $0.15/1M | Output: $0.60/1M
   Context: 128K in / 16K out

2. gpt-4o
   Provider: openai | Mode: chat
   Input: $5.00/1M | Output: $15.00/1M
   Context: 128K in / 16K out
refresh_prices

Force re-fetch pricing data from the LiteLLM registry (cache is refreshed automatically every 24h).

Docs

Full documentation at tokencost.dev

License

MIT

الأسئلة الشائعة

ما هو io.github.jeff-atriumn/tokencost-dev؟

LLM pricing oracle — model lookup, cost estimation, and comparison via LiteLLM

كيف أثبّت io.github.jeff-atriumn/tokencost-dev؟

يعمل على جهازك. في Claude Code: claude mcp add tokencost-dev -- npx -y tokencost-dev@0.1.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.jeff-atriumn/tokencost-dev إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.jeff-atriumn/tokencost-dev مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.jeff-atriumn/tokencost-dev؟

ينشره atriumn. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.