# Repomix

> Repomix is an open-source MCP server for developer tools. Pack a local or remote repository into one AI-readable file for LLMs and agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Web, macOS, Linux, Windows
- **Website:** https://repomix.com
- **Repository:** https://github.com/yamadashy/repomix
- **MCP Registry name:** io.github.yamadashy/repomix
- **Categories:** developer tools, AI models and LLM tooling
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add repomix -- npx -y repomix
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "repomix": {
      "command": "npx",
      "args": [
        "-y",
        "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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/repomix
