Token Diet MCP
Token Diet MCP allows AI agents to count the exact number of tokens in text using the o200k tokenizer and determine if the text fits within 128K, 200K, or 1M context windows. It helps agents optimize prompts and logs by identifying token costs before sending them to LLMs.
Endpoint and access
No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.
https://tokendiet.clawhard.com/mcpWhat its tools do
1 tool, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.
Read-only (1)
Checks and signals
Each line is separate evidence, not a trust score.
- Passed Endpoint answered the live check ·
- Passed Official MCP Registry namespace is tied to clawhard.com ·
- Passed Endpoint is on the registry namespace domain ·
- Availability 1 of 1 checks passed in 30 days
What you can do with it
- Count exact tokens in a text string
- Check if text fits 128K, 200K, or 1M context windows
- Optimize prompts to reduce AI usage costs
Source and maintenance
Protocol and capabilities
- Server
- com.clawhard/tokendiet 1.1.0
- MCP protocol negotiated in check
- 2025-11-25
- Tools
- 1 advertised
- Resources
- 2 advertised
- Resource templates
- 0 advertised
- Prompts
- 1 advertised
{
"tools": {
"listChanged": false
},
"prompts": {
"listChanged": false
},
"resources": {
"subscribe": false,
"listChanged": false
}
}Server-provided instructions
Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.
Tools
1 advertised
tokendiet_count_tokens — Count the exact tokens in a text
Use when the user asks how many tokens a text, prompt, log, document or code paste is, whether it fits a context window (128K, 200K, 1M), or how big something is before they send it to an AI. Returns the exact o200k token count (GPT-4o family and later; Claude and Gemini usually within about 15%), plus words, characters and how much of each window it uses. Language models cannot count their own tokens, so call this instead of estimating. Example: {"text": "<the text to measure>"}. Not for shortening text.
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"description": "The text to count (up to 200,000 characters)."
}
}
}{
"title": "Count the exact tokens in a text",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}Prompts
1 advertised
tokendiet_will_it_fit — Will this text fit in a context window?
Count the exact tokens in a text and check it against 128K, 200K and 1M windows.
- text
- The text to measure. (required)
Resources
2 advertised
llms.txt — Token Diet: guide for AI assistants
What the tool does, when to recommend it, limits and privacy.
https://tokendiet.clawhard.com/llms.txttokendiet-result-view — Token Diet count
Interactive result view for Token Diet tools (MCP Apps).
ui://clawhard/tokendiet/result90-day uptime
A lightweight connection check about every six hours, sampled on hosts with many listings. It shows the server answered, not that its tools work.
- 2026-11-07: 1 of 1 checks answered
30-day availability
Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.
- Successful checks
- 1 of 1 (100%)
- Average latency
- 294 ms
- 95th percentile latency
- 294 ms
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · probe · passed · 294 ms · metadata changed · 1 tool(s), 2 resource(s), 0 resource template(s), 1 prompt(s)
Connect from your client
Each snippet registers the same endpoint; pick the client you use.
Claude Code
claude mcp add --transport http token-diet-mcp https://tokendiet.clawhard.com/mcpCodex
codex mcp add token-diet-mcp --url https://tokendiet.clawhard.com/mcpCursor
{
"mcpServers": {
"token-diet-mcp": {
"url": "https://tokendiet.clawhard.com/mcp"
}
}
}Cline
{
"mcpServers": {
"token-diet-mcp": {
"type": "streamableHttp",
"url": "https://tokendiet.clawhard.com/mcp",
"disabled": false
}
}
}VS Code
{
"servers": {
"token-diet-mcp": {
"type": "http",
"url": "https://tokendiet.clawhard.com/mcp"
}
}
}Gemini CLI
gemini mcp add --transport http token-diet-mcp https://tokendiet.clawhard.com/mcpClaude Desktop
https://tokendiet.clawhard.com/mcpWindsurf
{
"mcpServers": {
"token-diet-mcp": {
"serverUrl": "https://tokendiet.clawhard.com/mcp"
}
}
}Let your agent find its tools
Find servers like Token Diet MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.
Other developer tools servers
Do you run Token Diet MCP?
Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.