# Cursor × Tokenade

> Tokenade hooks into Cursor; a few layers stay partial, detailed below.

## What `tokenade install` does

- Hooks in `~/.cursor/hooks.json`: `preToolUse` rewrites shell commands to `tokenade wrap`, `postToolUse` folds MCP results.
- Rules: `~/.cursor/rules/tokenade.mdc`.
- MCP: every third-party server in `~/.cursor/mcp.json` and `.cursor/mcp.json` is wrapped as `tokenade mcp-proxy -- <original command>` (original kept, undone by `tokenade uninstall`), so its results reach you folded.

## Coverage

- ✓ Command compaction — Supported
- ✓ Web search — Supported
- ✓ MCP optimization — Supported
- ✓ Code search — Supported
- ✓ Lean output — Supported
- ◐ Context optimization — Partial
- ✓ Re-read dedup — Supported
- ✓ Documents & media — Supported
- ✓ Privacy — Supported
- ✓ Secret redaction — Supported

## What isn't compressed

- Context is partial: Cursor talks to its backend in its own protocol, which the local proxy doesn't rewrite, so history isn't trimmed.

## Install

    npm install -g @tokenade/cli
    tokenade install
    tokenade login

`tokenade uninstall` restores every file it touched.

## Read next

- https://tokenade.net/tokenade.md
- https://tokenade.net/install.md
- https://tokenade.net/en/docs/compatibility
