Menyediakan pengecekan harga LLM, estimasi biaya, dan perbandingan model menggunakan registry LiteLLM.
Juga dikenal sebagai atriumn/tokencost-dev
- Stars
- 1
- Tools
- 2
- Unduhan, 30 hari
- —
- Versi terbaru
- 0.1.3
- Commit terakhir
- 13 Nov 2026
- Lisensi
- MIT
Apa itu tokencost MCP?
tokencost adalah MCP server. Menyediakan pengecekan harga LLM, estimasi biaya, dan perbandingan model menggunakan registry LiteLLM. Server ini menyediakan 2 tool, seperti gpt-4o-mini, gpt-4o.
Ringkasan dibuat dari README proyek
Tentang tokencost MCP server
Developer dapat menggunakan tokencost-dev untuk mengestimasi pengeluaran large language model dan membandingkan spesifikasi model. Server ini terhubung ke AI client Anda untuk menyediakan data harga instan, limit context window, dan detail kapabilitas untuk berbagai model. Tool ini berjalan secara lokal via npx dan tidak memerlukan API key, akun, atau file konfigurasi yang rumit untuk berfungsi.
Pengguna dapat berinteraksi dengan server melalui tools seperti get_model_details untuk mencari model tertentu atau calculate_estimate untuk menentukan harga dari jumlah token tertentu. Sistem ini menggunakan LiteLLM community registry untuk mengambil data dan menyimpan informasi tersebut secara lokal selama 24 jam. Jika Anda membutuhkan data terbaru secara instan, Anda dapat menggunakan tool refresh_prices untuk melewati cache.
Tool ini sangat berguna bagi pengguna Claude Code atau Cursor. Tool ini mendukung fuzzy matching, yang berarti Anda bisa bertanya tentang model menggunakan nama natural alih-alih string teknis yang kaku. Dengan menggunakan compare_models, Anda dapat mengidentifikasi opsi yang paling hemat biaya di antara provider atau mode tertentu.
Apa yang bisa Anda lakukan dengannya
- 1Hitung biaya token spesifikTentukan harga eksak untuk jumlah token input dan output tertentu pada sebuah model.
- 2Bandingkan harga modelTemukan model yang paling ekonomis dalam provider atau kategori tertentu.
- 3Ambil spesifikasi modelDapatkan informasi detail mengenai context window dan kapabilitas yang didukung oleh sebuah model.
- 4Pengecekan harga cepatAjukan pertanyaan dalam bahasa natural untuk mengetahui berapa biaya dari model tertentu.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal tokencost MCP
Format diverifikasi 10 Nov 2026Tambahkan ke CursorTambahkan ke GooseInstal tokencost MCP di Claude Code
$ claude mcp add tokencost-dev -- npx -y tokencost-devInstal tokencost MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Instal tokencost MCP di VS Code
.vscode/mcp.json
{
"servers": {
"tokencost-dev": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Instal tokencost MCP di VS Code CLI
$ code --add-mcp '{"name":"tokencost-dev","type":"stdio","command":"npx","args":["-y","tokencost-dev"]}'Instal tokencost MCP di Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Instal tokencost MCP di Codex
$ codex mcp add tokencost-dev -- npx -y tokencost-devInstal tokencost MCP di Codex config.toml
~/.codex/config.toml
[mcp_servers.tokencost-dev] command = "npx" args = ["-y", "tokencost-dev"]
Instal tokencost MCP di Gemini CLI
$ gemini mcp add -s user tokencost-dev npx -- -y tokencost-devInstal tokencost MCP di Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Tool tokencost MCP 2
Terdeteksi dari READMEgpt-4o-minigpt-4o
| gpt-4o-mini | — | |
| gpt-4o | — |
Pengecekan otomatis
Berjalan 13 Nov 2026Laporan lengkap →Lolos checks otomatis kami. Ini bukan audit keamanan: baca kodenya dan berikan server akses paling terbatas yang dibutuhkannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkauatriumn/tokencost-dev is public and reachablegithub.com/atriumn/tokencost-dev ↗Lolos
- Nama paket mencantumkan repositori ini sebagai sumbernyatokencost-dev names atriumn/tokencost-dev as sourcenpmjs.com/package/tokencost-dev ↗Lolos
- Provenance build (atestasi Sigstore)Sigstore attestation for tokencost-devnpmjs.com/package/tokencost-dev/v/0.1.3#provenance ↗Lolos
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html ↗Lolos
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-11-03github.com/atriumn/tokencost-dev ↗Lolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerNo popular package one edit away from tokencost-devLolos
- Tidak ada advisory kritis pada paket atau dependensinya100 resolved dependencies checked; no critical advisoryosv.dev ↗Lolos
- Tidak ada instruksi tersembunyi untuk model2 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelNo tool named like delete, drop or execLolos
- Endpoint remote merespons handshake MCPTidak diperiksa
README
Lihat di GitHubInstall 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
Pertanyaan tentang tokencost MCP
Bagaimana cara menambahkan tokencost MCP ke Claude Code?
Jalankan claude mcp add tokencost-dev -- npx -y tokencost-dev di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan tokencost MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Tool apa yang disediakan tokencost MCP?
Server ini menyediakan 2 tool, termasuk gpt-4o-mini, gpt-4o.
Apakah saya memerlukan API key untuk menggunakan tokencost?
Tidak, server ini tidak memerlukan API key, akun, atau file konfigurasi.