How to stop a coding agent from dumping the whole repo

Last updated 29 August 2026

Hexum is an MCP server for Cursor, Claude Code, and other coding agents. It sits between the agent and the model: hexum_shrink sends this turn instead of the repository, hexum_check fails the turn when architecture.hexum is broken, and you keep your editor. On MBPP, context dropped about 85% with the same tests passing.

Steps

  1. Mint a hexum_live_ key at /app with usage billing on.
  2. Install MCP. Hexum MCP install for Cursor or Hexum for Claude Code.
  3. The agent calls hexum_shrink, then hexum_check.
mcp.json
{
  "mcpServers": {
    "hexum": {
      "serverUrl": "https://hexum.dev/mcp",
      "headers": { "Authorization": "Bearer hexum_live_…" }
    }
  }
}

Compared with sending every file: repo dump vs Hexum. Proof: 220,393 vs 27,352 tokens.

FAQ

How does Hexum reduce tokens?

The agent calls hexum_shrink before it reads widely. The model is sent this turn, not the repository. On MBPP, measured context dropped about 85% with the same tests passing. Example turn: 18.2k → 3.1k tokens, 41 files → 6. See /benchmarks and /methodology.

What is Hexum?

Hexum is an MCP server for Cursor, Claude Code, and other coding agents. It sits between the agent and the model: hexum_shrink sends this turn instead of the repository, hexum_check fails the turn when architecture.hexum is broken, and you keep your editor. On MBPP, context dropped about 85% with the same tests passing.

How do I add Hexum to Cursor?

Turn on usage billing at /app, mint a hexum_live_ key, paste the mcpServers JSON into Cursor Settings → MCP or ~/.cursor/mcp.json, then reload. Details: /cursor.

Does Hexum replace Cursor or Claude Code?

No. Hexum is a hosted MCP server. You keep Cursor, Claude Code, Antigravity, Codex, or Grok. Hexum is not an IDE and not a model.

What is tokens saved?

Tokens in minus tokens out, when that is positive. Stripe is billed on tokens saved. Calls that do not save tokens still increment calls and the in/out counters.