Repomix

Lets an assistant pack a local or GitHub codebase into one AI-readable file, then read and search it.

By Kazuki Yamada (individual) TypeScript Local · stdio Developer toolsKnowledge and memory

104 popularity score ★ 29k ↓ 109k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add repomix -- npx -y repomix --mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "repomix",
        "--mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "repomix",
        "--mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "repomix": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "repomix",
        "--mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.repomix]
command = "npx"
args = ["-y", "repomix", "--mcp"]
Gemini CLITerminal
gemini mcp add --scope user repomix npx -- -y repomix --mcp

What it does

Repomix packs a whole repository into a single AI-friendly file. Run as an MCP server (repomix --mcp), it lets an assistant package a local directory or a remote GitHub repository on request, instead of the user preparing the file by hand, and then read the output in line ranges or search it with regular expressions so large codebases can be explored a piece at a time.

Packing respects .gitignore and takes include and ignore glob patterns; optional Tree-sitter compression keeps code signatures and structure and drops implementation details, which the README puts at about 70% fewer tokens. Packed output also runs through a Secretlint check for sensitive information. A generate_skill tool turns a local codebase into a Claude Agent Skill package with SKILL.md and reference files.

It runs with npx -y repomix --mcp (Node.js), or from the Docker image ghcr.io/yamadashy/repomix with the --mcp argument. With --sandbox the file tools are confined to one workspace directory and only read-only tools are registered. Repomix is also a command-line tool and has a hosted web version at repomix.com.

Tools 8

pack_codebase
Package a local code directory into one consolidated XML file for analysis, with optional include/ignore glob patterns and Tree-sitter compression that keeps signatures and structure.
pack_remote_repository
Fetch, clone and package a GitHub repository (URL or user/repo) into one consolidated XML file, with the same filtering and compression options.
attach_packed_output
Attach an existing Repomix packed output file (or a directory holding repomix-output.xml) without re-processing it.
read_repomix_output
Read the contents of a generated output by its ID, optionally only a line range.
grep_repomix_output
Search a generated output with JavaScript regular expressions, with context lines and case-insensitive matching.
generate_skill
Generate a Claude Agent Skill from a local code directory: a SKILL.md plus a references folder with summary, project structure and files.
file_system_read_file
Read a file inside the sandbox workspace (only in --sandbox mode); content matching known secret formats is refused.
file_system_read_directory
List the contents of a directory inside the sandbox workspace (only in --sandbox mode).

Similar servers