ai-token-counter
Cloudflare Workers MCP server: ai-token-counter
使うべきか
品質と安全性
A
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
~421トークン数(ツール定義)
~757 B一般的なレスポンスサイズ
注意への影響は最小限(128k コンテキストの 0.33%)
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"ai-token-counter": {
"url": "https://api.lazy-mac.com/ai-token-counter/mcp"
}
}
}リモートエンドポイント
https://api.lazy-mac.com/ai-token-counter/mcpstreamable-httpできること
ツール一覧
ツール(4)
🟢 読み取り専用🟡 書き込み🔴 削除⚪ 不明
🟢count_tokens(model, text, messages)
Count tokens for a text string or chat messages array for any supported AI model (GPT-4o, Claude, Gemini, Mistral, Llama).
入力スキーマ
{
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID, e.g. gpt-4o, claude-sonnet-4. Defaults to gpt-4o."
},
"text": {
"type": "string",
"description": "Plain text to count tokens for."
},
"messages": {
"type": "array",
"description": "Chat messages array in OpenAI/Anthropic format.",
"items": {
"type": "object"
}
}
}
}⚪estimate_cost(model, input_tokens, output_tokens, text, requests_per_day)
Estimate the cost of an AI API call given model and token counts or text. Returns input/output/total cost and optional monthly projection.
入力スキーマ
{
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID, e.g. gpt-4o, claude-opus-4, gemini-2.0-flash."
},
"input_tokens": {
"type": "integer",
"description": "Number of input tokens."
},
"output_tokens": {
"type": "integer",
"description": "Number of output tokens."
},
"text": {
"type": "string",
"description": "Text to tokenize for input (if input_tokens not given)."
},
"requests_per_day": {
"type": "number",
"description": "If given, adds daily/monthly/yearly cost projection."
}
},
"required": [
"model"
]
}🟢get_model_pricing(model)
Get input/output pricing per 1M tokens for a specific AI model.
入力スキーマ
{
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID, e.g. gpt-4o, claude-haiku-3, llama-3-70b."
}
},
"required": [
"model"
]
}🟢list_models
List all supported AI models with their pricing and context windows.
入力スキーマ
{
"type": "object",
"properties": {}
}コミュニティ
エビデンス
最近の観測
検証済みバージョンは記録されていませんツール 4 件
検証済みバージョンは記録されていませんツール 4 件