npm tokencost-devstdioMITupdated 14d ago
Ask your AI assistant "how much does GPT-4o cost?" — get an instant, accurate answer.
tokencost dev で何ができる?
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
インストール
tokencost dev をクライアントに追加します。お使いのものを選んでください。
claude mcp add tokencost-dev -- npx -y tokencost-devcodex mcp add tokencost-dev -- npx -y tokencost-devamp mcp add tokencost-dev -- npx -y tokencost-dev{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"tokencost-dev","command":"npx","args":["-y","tokencost-dev"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"tokencost-dev": {
"command": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"tokencost-dev": {
"type": "local",
"command": "npx",
"args": [
"-y",
"tokencost-dev"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"tokencost-dev": {
"command": {
"path": "npx",
"args": [
"-y",
"tokencost-dev"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y tokencost-devRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
スコア
39 / 100
情報不足
- ドキュメント22/25
- メンテナンス19/25
- 信頼性16/20
- 機能0/15
- 導入のしやすさ12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 6 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
バージョン履歴
| バージョン | 公開日 |
|---|---|
| 0.1.3最新 | 2026年2月27日 |