Repomix
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
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
Maintainer
Works with
Installation
NPM
npx -y repomixManual Installation
npx -y repomixConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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@latestPack 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/repoEnable 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.xmlAdd 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.
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.
Repomix Alternatives — Similar Developer Tools Servers
Looking for alternatives to Repomix? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Repomix in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.