DistillDistill

Introduction

Open-source MCP server for Claude Code — smart LLM context compression

Distill Documentation

Distill is an open-source MCP server for Claude Code. It compresses LLM context upstream — build logs, diffs, code, stacktraces — before Claude Code consumes it. The result: up to 98% fewer tokens, with no signal loss.

No authentication, no API keys, no cloud services — install and use.

What is MCP? MCP (Model Context Protocol) is an open standard that lets Claude Code talk to external servers. Distill is an MCP server that helps Claude Code spend fewer tokens by compressing context intelligently.

Quick start

Two steps, one minute.

1. Install and configure

npm install -g distill-mcp
distill-mcp setup

The setup command detects and configures Claude Code automatically.

2. Start saving tokens

The server exposes 3 always-loaded tools: auto_optimize, smart_file_read, and code_execute.

Features

  • 3 precision tools — Auto compression, AST-aware reading, sandboxed TypeScript SDK
  • AST parsing — Extract functions, classes, and types from code (TypeScript, Python, Go, Rust, PHP, Swift)
  • Native Claude Code integration[DISTILL:COMPRESSED] marker, PreCompact hook, distill-compressor subagent, slash commands
  • 50-95% token savings — Depending on content type

Community

Distill is in beta — your feedback shapes the roadmap.

Next steps

Distill works with other MCP clients (Cursor, Windsurf, Antigravity, etc.) — the 3 tools are standard. The documentation focuses on Claude Code, the officially supported platform.

On this page