Skip to content
MCP server

Token Diet

Count tokens exactly for any text and see if it fits a 128K, 200K or 1M context window.

Install
Runs
Remotely
Version
1.1.0
Listing updated
5 days ago

About Token Diet

Token Diet is an MCP server. It runs as a hosted remote server, so there is nothing to install locally.

Install

Run in a terminal

claude mcp add --transport http tokendiet https://tokendiet.clawhard.com/mcp

Add to Settings → Connectors → Add custom connector

https://tokendiet.clawhard.com/mcp
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "tokendiet": {
      "url": "https://tokendiet.clawhard.com/mcp"
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "tokendiet": {
      "type": "http",
      "url": "https://tokendiet.clawhard.com/mcp"
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "tokendiet": {
      "serverUrl": "https://tokendiet.clawhard.com/mcp"
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "tokendiet": {
      "type": "http",
      "url": "https://tokendiet.clawhard.com/mcp"
    }
  }
}

Token Diet FAQ

How do I add Token Diet to Claude Code?

Run this command in your terminal: claude mcp add --transport http tokendiet https://tokendiet.clawhard.com/mcp