Skip to content
MCP server

Token Lens

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

Runs locallyStatus and history
Install
Runs
Locally
Version
0.2.37
Listing updated
5 days ago

About Token Lens

Token Lens is an MCP server. It runs locally on your machine and is started by your AI client.

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

Install

Run in a terminal

claude mcp add token-lens -- npx -y @kunal_dutt/token-lens

Add to claude_desktop_config.json

{
  "mcpServers": {
    "token-lens": {
      "command": "npx",
      "args": [
        "-y",
        "@kunal_dutt/token-lens"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "token-lens": {
      "command": "npx",
      "args": [
        "-y",
        "@kunal_dutt/token-lens"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "token-lens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@kunal_dutt/token-lens"
      ]
    }
  }
}

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

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

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

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

Using several servers? Build one config file with the MCP config generator.

Token Lens FAQ

How do I add Token Lens to Claude Code?

Run this command in your terminal: claude mcp add token-lens -- npx -y @kunal_dutt/token-lens

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers