explaingit

madeye/mcp-distill

Analysis updated 2026-05-18

5RustAudience · developerComplexity · 3/5Setup · moderate

TLDR

An MCP server that records every prompt and response from Claude and Codex so the logs can train a smaller model.

Mindmap

mindmap
  root((mcp-distill))
    What it does
      Records prompts and responses
      Auto-captures MCP turns
      Exports training datasets
    Tech stack
      Rust
      MCP protocol
      JSONL storage
    Use cases
      Model distillation data
      Fine-tuning datasets
      Session auditing
    Audience
      Developers
      ML engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Capture real coding-assistant conversations to build a fine-tuning dataset.

USE CASE 2

Auto-record every Claude Code or Codex session with zero manual setup.

USE CASE 3

Export collected sessions into openai_chat, sharegpt, or anthropic format for training.

What is it built with?

RustMCPJSONLzstd

How does it compare?

madeye/mcp-distillpatrickelectric/mavftp-cliandroolloyd/octravpn
Stars554
LanguageRustRustRust
Last pushed2025-05-28
MaintenanceStale
Setup difficultymoderateeasyhard
Complexity3/52/55/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires building from source with cargo and registering the MCP server with Codex or Claude Code.

In plain English

mcp-distill is a recording server for AI coding tools that captures every prompt, context snippet, and response from Claude and Codex so you can use those interactions as training data to fine-tune a smaller model. The idea behind small-model distillation is that the responses from a large, expensive model can teach a smaller, cheaper model to behave similarly, but first you need the raw conversation data. The server speaks the Model Context Protocol (MCP), a standard way for AI coding assistants to communicate with external tools. Once installed alongside Codex or Claude Code, it automatically intercepts each conversation turn and saves it losslessly as a JSONL file, a format where each line is a self-contained JSON record. The data is organized by date under a configurable storage directory. When you want to train a model, you export the collected sessions in one of three formats: openai_chat, sharegpt, or anthropic, depending on which training framework you are using. Installation is handled by the tool itself. Running the install command for either Codex or Claude Code modifies the relevant configuration file to add mcp-distill as a registered server. The recording starts automatically when the server launches, so no manual setup is needed for routine use. You can pause and resume recording, start named sessions, append turns manually, or export a dataset on demand through exposed MCP tools. The server is built in Rust and compiled to a single binary. It supports optional zstd compression for stored sessions. The export output can be fed directly into training frameworks like Unsloth with minimal preprocessing.

Copy-paste prompts

Prompt 1
Help me install mcp-distill into my Claude Code setup and start recording sessions.
Prompt 2
Explain how mcp-distill's JSONL storage format is organized by date.
Prompt 3
Show me how to export mcp-distill sessions into a format Unsloth can train on.
Prompt 4
Help me pause and resume mcp-distill recording using its MCP tools.

Frequently asked questions

What is mcp-distill?

An MCP server that records every prompt and response from Claude and Codex so the logs can train a smaller model.

What language is mcp-distill written in?

Mainly Rust. The stack also includes Rust, MCP, JSONL.

How hard is mcp-distill to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mcp-distill for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.