Repomix

v1.0.0Developer Toolsstable

Repomix MCP Server enables AI models to efficiently analyze codebases by packaging local or remote repositories into optimized single files, with intelligent compression via Tree-sitter to significantly reduce token usage while preserving code struct

aianthropicartificial-intelligencechatbotchatgpt
Share:
25,323
Stars
0
Downloads
0
Weekly
0/5

What is Repomix?

Repomix is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to repomix mcp server enables ai models to efficiently analyze codebases by packaging local or remote repositories into optimized single files, with intelligent compression via tree-sitter to significant...

Repomix MCP Server enables AI models to efficiently analyze codebases by packaging local or remote repositories into optimized single files, with intelligent compression via Tree-sitter to significantly reduce token usage while preserving code struct

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Repomix MCP Server enables AI models to efficiently analyze

Use Cases

Codebase analysis
Token optimization
Repository packaging
yamadashy

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y repomix

Manual Installation

npx -y repomix

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Repomix

Repomix is a developer tool that packs an entire repository — local or remote — into a single, AI-optimized file that can be fed directly to large language models like Claude, ChatGPT, Gemini, or Llama. It is git-aware (respecting .gitignore and .repomixignore), security-focused (detecting secrets with Secretlint), and supports intelligent code compression using Tree-sitter to significantly reduce token count while preserving code structure. The Repomix MCP server lets AI coding agents invoke repository packaging on demand, enabling seamless codebase analysis without manual file concatenation. Developers use it to onboard AI assistants to large, multi-file projects in a single context window.

Prerequisites

  • Node.js 18 or later installed
  • An MCP-compatible client such as Claude Desktop, Cursor, or VS Code with MCP support
  • Access to the repository you want to pack (local path or public GitHub URL)
  • Optional: a repomix.config.json in your project root for persistent configuration
1

Try Repomix instantly with npx

Run Repomix in any project directory without installing it globally. It will generate a repomix-output.xml file containing your entire repository in an AI-friendly XML format. This is the fastest way to test it.

npx repomix@latest
2

Pack a remote GitHub repository

You can pack a remote repository directly by passing its GitHub URL. Repomix clones it temporarily and produces a packed output file you can immediately send to an AI assistant.

npx repomix --remote https://github.com/owner/repo
3

Enable code compression to reduce token usage

Use the --compress flag to activate Tree-sitter-based compression. This extracts key structural elements (function signatures, class definitions, type declarations) while omitting implementation bodies, substantially reducing token count for large codebases.

npx repomix --compress --output repomix-compressed.xml
4

Add the Repomix MCP server to your client configuration

Configure the Repomix MCP server in your MCP client's config file. Once configured, AI coding agents can invoke Repomix tools directly during a conversation to pack and analyze repositories on demand.

5

Restart your MCP client and verify

After saving the configuration, fully quit and reopen your MCP client. Repomix tools should now be available in the tool list, and your AI assistant can pack repositories when you request codebase analysis.

Repomix Examples

Client configuration

Add this block to your claude_desktop_config.json under the mcpServers key. The server uses npx to run the latest version of repomix on demand.

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

Prompts to try

Use these prompts once the Repomix MCP server is connected to your AI coding assistant.

- "Pack the current repository and analyze the overall architecture"
- "Pack https://github.com/owner/repo with compression enabled and summarize the main modules"
- "Use Repomix to pack this project, then identify all API endpoints defined in the codebase"
- "Pack the repository and estimate how many tokens it would use with and without compression"

Troubleshooting Repomix

Output file is too large for the AI model's context window

Use the --compress flag to enable Tree-sitter compression, which can reduce token count by 50-70% on average. You can also use --include or --ignore flags to target specific directories, or create a repomix.config.json with an ignore list for test files, fixtures, and generated code.

Sensitive files or secrets appear in the packed output

Repomix automatically runs Secretlint to detect secrets. Ensure your .gitignore includes .env files and credential files. You can also add a .repomixignore file (same format as .gitignore) to exclude additional paths from the output.

Remote repository fetch fails or times out

For large repositories, the clone step can be slow. Ensure you have a stable internet connection and sufficient disk space in your temp directory. For private repositories, authenticate by setting GITHUB_TOKEN as an environment variable before running the command.

Frequently Asked Questions about Repomix

What is Repomix?

Repomix is a Model Context Protocol (MCP) server that repomix mcp server enables ai models to efficiently analyze codebases by packaging local or remote repositories into optimized single files, with intelligent compression via tree-sitter to significantly reduce token usage while preserving code struct It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Repomix?

Install via npm with the command: npx -y repomix. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Repomix?

Repomix works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Repomix free to use?

Yes, Repomix is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Repomix?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides