Koskamo

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.

Token Diet MCP logo, by Clawhard StudioVendor evidenceStreamable HTTPNo sign-inEndpoint checked 2026-11-07Operated by Clawhard Studio
MCP endpoint (Streamable HTTP)
https://tokendiet.clawhard.com/mcp
Vendor documentation

What its tools do

1 tool, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.

1 of 1 have a description · 1 of 1 declare behavior hints · 1 of 1 with parameters document them all

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

Vendor evidenceRegistry 1.1.0

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
Server-advertised capabilities
{
  "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.

Token Diet: Token Diet shrinks what you paste into AI. It shows what a prompt costs in tokens and cuts the junk in one tap (base64 blobs, giant JSON, repeated log lines, stack-trace noise) so you hit your AI usage limit later. Runs in your browser. Use it when your prompts are too long or you keep hitting an AI usage limit. Tools: tokendiet_count_tokens (Count the exact tokens in a text). Results include a link (open_url) that the user can open to see the same result on the website.

Tools

1 advertised

tokendiet_count_tokens — Count the exact tokens in a text
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

tokendiet_count_tokens input schema
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "The text to count (up to 200,000 characters)."
    }
  }
}
tokendiet_count_tokens annotations
{
  "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?

Advertised by the server during the last successful anonymous check.

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

Advertised by the server during the last successful anonymous check.

What the tool does, when to recommend it, limits and privacy.

llms.txt URI
https://tokendiet.clawhard.com/llms.txt

MIME type: text/markdown

tokendiet-result-view — Token Diet count

Advertised by the server during the last successful anonymous check.

Interactive result view for Token Diet tools (MCP Apps).

tokendiet-result-view URI
ui://clawhard/tokendiet/result

MIME type: text/html;profile=mcp-app

90-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.

Too few checks for a percentage yet (1 of 1 answered).

  1. 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.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Claude Code

Run this once in a terminal. It registers the remote server. Use --scope project to write .mcp.json for the repo.
Claude Code configuration
claude mcp add --transport http token-diet-mcp https://tokendiet.clawhard.com/mcp

Codex

Run this once. Codex stores MCP servers in ~/.codex/config.toml (or .codex/config.toml in a trusted project).
Codex configuration
codex mcp add token-diet-mcp --url https://tokendiet.clawhard.com/mcp

Cursor

Merge this server into .cursor/mcp.json in your project, then enable token-diet-mcp in your MCP settings.
Cursor configuration
{
  "mcpServers": {
    "token-diet-mcp": {
      "url": "https://tokendiet.clawhard.com/mcp"
    }
  }
}

Cline

Merge this into cline_mcp_settings.json (Cline → MCP Servers → Configure).
Cline configuration
{
  "mcpServers": {
    "token-diet-mcp": {
      "type": "streamableHttp",
      "url": "https://tokendiet.clawhard.com/mcp",
      "disabled": false
    }
  }
}

VS Code

Merge this server into .vscode/mcp.json. Use MCP: List Servers to start token-diet-mcp and inspect its tools.
VS Code configuration
{
  "servers": {
    "token-diet-mcp": {
      "type": "http",
      "url": "https://tokendiet.clawhard.com/mcp"
    }
  }
}

Gemini CLI

Run this once. It writes .gemini/settings.json in the current project; pass --scope user for ~/.gemini/settings.json.
Gemini CLI configuration
gemini mcp add --transport http token-diet-mcp https://tokendiet.clawhard.com/mcp

Claude Desktop

Open Claude Settings > Connectors > Add custom connector, enter this server URL and enable it for the conversation. This is a manual remote-connector handoff, not a desktop JSON configuration.
Claude Desktop configuration
https://tokendiet.clawhard.com/mcp

Windsurf

Merge this into ~/.codeium/windsurf/mcp_config.json, then refresh MCP in Cascade. Windsurf remote servers use serverUrl, not url.
Windsurf configuration
{
  "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.

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.

Claim this listing