ai-token-counter
Cloudflare Workers MCP server: ai-token-counter
Sollte ich dies verwenden
Qualität und Sicherheit
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"ai-token-counter": {
"url": "https://api.lazy-mac.com/ai-token-counter/mcp"
}
}
}Remote-Endpunkte
https://api.lazy-mac.com/ai-token-counter/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (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).
Eingabe-Schema
{
"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.
Eingabe-Schema
{
"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.
Eingabe-Schema
{
"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.
Eingabe-Schema
{
"type": "object",
"properties": {}
}Community
Nachweis