Labsco
MCP SERVER

Repomix

by yamadashy

Pack a codebase — yours or one on GitHub — into a single document an agent can read, grep and quote from.

Codebase Context Packing & CompressionVerified
Summary
A whole codebase becomes one document an agent can read.

Point it at a directory or a GitHub URL and one packed file comes back with the tree, the contents and the metrics, instead of you opening files one at a time. It answers with an id rather than the pack, so you choose what part of it ever reaches the model.

What it is

The MCP side of Repomix, the packer that flattens a codebase into one file an AI can read. It runs locally over stdio, and it will pack a directory on your machine or clone a public repository and pack that. Packing runs a secret scan first, and the output is addressed by an id rather than returned whole.

What you get
  • A local directory packed into one consolidated file carrying the file tree, the contents and the metrics
  • A GitHub repository packed the same way — it fetches and clones it for you
  • A packed output read back by line range, or grepped with JavaScript regular expressions, returning matching lines with context
  • A packed output you already have attached, so a pack made elsewhere can be worked with here
  • A Claude Agent Skill generated from a directory or a remote repository — `SKILL.md` plus a `references/` folder holding a summary, the project structure with line counts and more
  • A `--sandbox` mode that confines the file tools to one workspace root: absolute paths, `~`, `..`, Windows drive and UNC paths are all refused, as are symlinks that resolve outside it
  • Two raw file tools that exist only in sandbox mode, where the workspace root is what bounds them — `file_system_read_file`, `file_system_read_directory`
Requirements

Npx on your PATH — `repomix --mcp` starts MCP mode from the same package. Packing a remote repository clones it first, so that call needs network access. By default the server can read any path the host user can; `--sandbox` narrows that to one directory, and in exchange remote packing, skill generation and attaching external outputs are switched off. That confinement is at the tool layer, not the operating system's.

Setup effort

One command — repomix --mcp