Skip to content
MCP server

Token Counter

Counts tokens under OpenAI-compatible (tiktoken) encodings, by model or encoding name.

Install
Runs
Remotely
Version
1.0.0
Listing updated
4 days ago

About Token Counter

Token Counter 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 token-counter https://apished.com/mcp/v1/tokens

Add to Settings → Connectors → Add custom connector

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

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "token-counter": {
      "url": "https://apished.com/mcp/v1/tokens"
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "token-counter": {
      "type": "http",
      "url": "https://apished.com/mcp/v1/tokens"
    }
  }
}

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

{
  "mcpServers": {
    "token-counter": {
      "serverUrl": "https://apished.com/mcp/v1/tokens"
    }
  }
}

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

{
  "mcpServers": {
    "token-counter": {
      "type": "http",
      "url": "https://apished.com/mcp/v1/tokens"
    }
  }
}

Token Counter FAQ

How do I add Token Counter to Claude Code?

Run this command in your terminal: claude mcp add --transport http token-counter https://apished.com/mcp/v1/tokens