# token-disrespector

> token-disrespector is an open-source MCP server for developer tools. Local proxy that shrinks coding-agent context and lets the model fetch originals back. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, Windows, Self-hosted
- **Repository:** https://github.com/connorbless1990/token-disrespector
- **MCP Registry name:** io.github.connorbless1990/token-disrespector
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Coding agents resend their whole conversation on every turn, and large blocks such as file reads and command output make up most of it. This MCP server gives the model a way to recover those blocks: when a block was replaced by a compressed marker, the model calls a tool with the marker's handle and receives the original bytes unchanged.

The server runs locally over stdio and reads the same cache folder that the companion proxy writes to, so both need to run as the same user. It exposes two tools, one for retrieving a saved original and one for reporting cache size and daily token savings.

It suits developers who run AI coding agents against their own or a self-hosted model and want to cut prompt size without losing access to the full text of files or logs.

## Features

- **Byte-exact retrieval:** Returns the original text of any block that was shrunk, identical to what was sent before compression.
- **Savings reporting:** Shows cache size and per-day token savings through a dedicated stats tool.
- **Local stdio transport:** Runs as a local process over stdio, with no remote endpoint to configure.
- **Simple MCP setup:** Registers in any MCP client with a short JSON entry that launches the npm package.

## Good for

- Recovering a full file or log that a coding agent's context had compressed
- Checking how many tokens a coding agent session has saved over recent days
- Adding retrievable context compression to an MCP-capable coding client

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add token-disrespector -- npx -y @token-disrespector/mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add token-disrespector -- npx -y @token-disrespector/mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.token-disrespector]
command = "npx"
args = ["-y", "@token-disrespector/mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user token-disrespector npx -- -y @token-disrespector/mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "token-disrespector": {
      "command": "npx",
      "args": [
        "-y",
        "@token-disrespector/mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 2 tools reads data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `tds_retrieve` (name suggests: reads): Returns the byte-exact original for a compressed-block handle.
- `tds_stats`: Returns cache size and per-day token savings.

## FAQ

### How do I install token-disrespector?

Add an mcpServers entry that runs npx with the -y flag and the package name @token-disrespector/mcp. It needs Node 20 or newer.

### Does token-disrespector send data off the machine?

The server is local stdio only and reads the cache folder that the proxy writes on the same machine.

### Which tools does token-disrespector expose?

tds_retrieve returns the original for a compressed-block handle, and tds_stats reports cache size and per-day token savings.

### Is token-disrespector free?

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

### How do I add token-disrespector to Claude Code?

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

### What are the best alternatives to token-disrespector?

The closest alternatives to token-disrespector are terse, Compress-token, ReToken, mcp-context-condenser and Tokenectomy Razor.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [terse](https://ai-powered.com/mcp/terse): terse is an open-source MCP server for developer tools.
- [Compress-token](https://ai-powered.com/mcp/compress-token): Compress-token is an open-source MCP server for developer tools.
- [ReToken](https://ai-powered.com/mcp/retoken): ReToken is an open-source MCP server for developer tools.
- [mcp-context-condenser](https://ai-powered.com/mcp/mcp-context-condenser): mcp-context-condenser is an open-source MCP server for developer tools.
- [Tokenectomy Razor](https://ai-powered.com/mcp/tokenectomy-razor): Tokenectomy Razor is an open-source MCP server for developer tools.
- [Polycracker ECU](https://ai-powered.com/mcp/polycracker-ecu): Polycracker ECU is a freemium MCP server for developer tools.
- [Distil](https://ai-powered.com/mcp/distil): Distil is an open-source MCP server for developer tools.
- [mcpspy](https://ai-powered.com/mcp/mcpspy): mcpspy is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/token-disrespector
