Repomix is an MCP server that provides AI assistants with access to the repomix packing tool, transforming local directories or remote Git repositories into structured, AI-friendly files. It connects large language model interfaces, such as Claude Code and Claude Desktop, directly to codebase packaging utilities. Developers and software engineers use Repomix to prepare code context for model evaluations, automated code reviews, architectural analyses, and complex debugging tasks without exceeding context window constraints. The server exposes tools to inspect codebases, calculate token consumption estimates, and compress output into xml, markdown, or plain text formats. Security controls restrict local file system operations strictly to the server launch directory, while temporary output files are automatically removed after content delivery. By enabling upfront size checks through dedicated estimation functions, the server allows AI models to verify payload limits before retrieving packed codebase content, preventing memory overflow and token exhaustion during deep analysis workflows.
Category: Developer Tools & Code Intelligence
Tags: codebase, context, file-processing, prompt-engineering, repository
npm install followed by npm run build. 3. For Claude Code, register the server by running: bash claude mcp add --scope user repomix node /path/to/repomix-mcp/dist/index.js 4. For Claude Desktop, edit claude_desktop_config.json to include the server configuration: json { "mcpServers": { "repomix": { "command": "node", "args": ["/path/to/repomix-mcp/dist/index.js"] } } } 5. Restart the MCP client to load the tools.Part of MCP Servers
Repomix packs local code directories or remote Git repositories into a single consolidated file structured for AI consumption. It offers tools to estimate file sizes and token counts, compress outputs to minimize tokens, and format codebases into XML, Markdown, or plain text.
Run npm install and npm run build inside the cloned repository. Then register the generated dist/index.js file with your client, such as executing claude mcp add for Claude Code or adding the node execution command to your claude_desktop_config.json file.
Repomix works with any MCP-compatible environment, including Claude Desktop and Claude Code. Clients configure it as a local process executed via Node.js pointing to the compiled distribution script.
Yes, Repomix is open source. The server code and documentation are maintained in a public GitHub repository under the Aeolun user account.
The server restricts local directory reads exclusively to the folder from which it was started, blocking traversal attempts outside that scope. Generated outputs are written to temporary system directories and removed immediately after data transfer.