MCP server
Token Lens
Context window token analysis and budget management
Runs locallyStatus and history
- Pricing
- Open source
- Runs
- Locally
- Version
- 0.1.2
- Listing updated
- 5 days ago
About Token Lens
Token Lens is an open-source MCP server. It runs locally on your machine and is started by your AI client.
Install
Run in a terminal
claude mcp add token-lens -- npx -y token-lens-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"token-lens": {
"command": "npx",
"args": [
"-y",
"token-lens-mcp"
]
}
}
}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",
"token-lens-mcp"
]
}
}
}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",
"token-lens-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"token-lens": {
"command": "npx",
"args": [
"-y",
"token-lens-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"token-lens": {
"command": "npx",
"args": [
"-y",
"token-lens-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Pricing
Open source
Token Lens FAQ
Is Token Lens free?
Yes. Token Lens is open source, so you can use and self-host it for free.
How do I add Token Lens to Claude Code?
Run this command in your terminal: claude mcp add token-lens -- npx -y token-lens-mcp
Where this comes from
- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.