count_tokens
Count tokens for a text string or chat messages array for any supported AI model (GPT-4o, Claude, Gemini, Mistral, Llama).
textmodelmessages
io.github.lazymac2xPublished by GitHub account lazymac2xv1.0.0Updated Oct 24, 2026
Cloudflare Workers MCP server: ai-token-counter
A remote MCP server that counts tokens and estimates API costs for major AI models such as GPT-4o, Claude, Gemini, Mistral and Llama.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.lazymac2x%2Fai-token-counter/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Add this to your client's mcpServers config.
{
"mcpServers": {
"ai-token-counter": {
"type": "http",
"url": "https://api.lazy-mac.com/ai-token-counter/mcp"
}
}
}Cloudflare Workers MCP server: ai-token-counter. REST + MCP (JSON-RPC 2.0). Live: api.lazy-mac.com/ai-token-counter
Source: README.md at commit aa1e26a
Count tokens for a text string or chat messages array for any supported AI model (GPT-4o, Claude, Gemini, Mistral, Llama).
textmodelmessagesEstimate the cost of an AI API call given model and token counts or text. Returns input/output/total cost and optional monthly projection.
textmodelrequiredinput_tokensoutput_tokensrequests_per_dayGet input/output pricing per 1M tokens for a specific AI model.
modelrequiredList all supported AI models with their pricing and context windows.
Takes no parameters.
90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare a license in the repository or the registry entry.