# Tokenscope

> Tokenscope is an open-source MCP server. Analyze Claude Code session cost & context attribution: output, cached re-reads, cache writes. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/wartzar-bee/tokenscope
- **MCP Registry name:** io.github.wartzar-bee/tokenscope
- **Listing updated:** 2026-11-13

## About

Analyze Claude Code session cost & context attribution: output, cached re-reads, cache writes.

## Install

### Claude Code (Terminal)

```sh
claude mcp add tokenscope -- npx -y @wartzar-bee/tokenscope-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "tokenscope": {
      "command": "npx",
      "args": [
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tokenscope": {
      "command": "npx",
      "args": [
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "tokenscope": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "tokenscope": {
      "command": "npx",
      "args": [
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tokenscope": {
      "command": "npx",
      "args": [
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ]
    }
  }
}
```

## FAQ

### Is Tokenscope free?

Yes. Tokenscope is open source, so you can use and self-host it for free.

### How do I add Tokenscope to Claude Code?

Run this command in your terminal: claude mcp add tokenscope -- npx -y @wartzar-bee/tokenscope-mcp

## Where this comes from

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

---
Source: https://ai-powered.com/mcp/tokenscope
