Token Lens

Level CLocal

Count and cut tokens in prompts, chats and agents for any model. Runs locally, collects no data.

⭐ 0OtherUpdated 2026-10-17

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "token-lens": {
      "command": "npx",
      "args": [
        "@kunal_dutt/token-lens"
      ]
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please install this MCP server into my current environment (repo URL unknown).

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "token-lens": {
      "command": "npx",
      "args": [
        "@kunal_dutt/token-lens"
      ]
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers