Skip to content
MCP server

Repomix

Pack a local or remote repository into one AI-readable file for LLMs and agents

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, Web, macOS
Runs
Locally
Version
1.19.0
Listing updated
3 days ago

About Repomix

Repomix is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Repomix turns a whole codebase into a single file that a chatbot can take in one paste. The output can be XML, Markdown, JSON or plain text, and the site's example is a repomix-output.xml sent to ChatGPT or Claude with a prompt asking for a refactor review.

It counts tokens per file and for the whole repository, honours .gitignore, .ignore and .repomixignore, and runs Secretlint to leave out files matching known credential formats. A --compress option uses Tree-sitter to keep key code elements and cut token count. Remote repositories can be packed from a shorthand like yamadashy/repomix, a full URL, a branch path or a commit URL, and the CLI uses locally installed git so private repositories work.

It installs with npx, npm, yarn, bun or Homebrew, can run in Docker, and has a hosted website. The registry entry runs the MCP server over stdio from the npm package.

Install

Run in a terminal

claude mcp add repomix -- npx -y repomix

Add to claude_desktop_config.json

{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "repomix"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "repomix"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "repomix": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "repomix"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "repomix"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "repomix"
      ]
    }
  }
}

What it does

Multiple output formats
Writes XML, Markdown, JSON or plain text.
Token counts
Reports tokens per file and for the repository.
Secret screening
Secretlint leaves out files that match credential formats.
Code compression
Tree-sitter extraction reduces tokens while keeping structure.
Remote packing
Packs a GitHub repo by shorthand, URL, branch or commit.
Ignore-file aware
Respects .gitignore, .ignore and .repomixignore.

Good for

  • Hand a whole repository to an AI for a refactor review
  • Fit a project inside an LLM context limit using token counts
  • Have an agent search a remote repository without cloning it
  • Prepare a codebase for documentation generation

Pricing

Open source

Free; the author accepts sponsorship

Prices change. Check repomix.com before you buy.

Repomix FAQ

Does it work with private repositories?

The CLI uses your local git, so it can reach private repos.

How does it avoid leaking secrets?

Secretlint flags files matching known credential formats and they are left out.

How do I try it?

Run npx repomix@latest in your project directory.

Can I use it without installing?

Yes, through the repomix.com website.

Is Repomix free?

Yes. Repomix is open source, so you can use and self-host it for free.

How do I add Repomix to Claude Code?

Run this command in your terminal: claude mcp add repomix -- npx -y repomix

What are the best alternatives to Repomix?

The closest alternatives to Repomix are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Repomix

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools