Allows packing remote GitHub repositories into AI-friendly files, enabling estimation of token counts and retrieval of consolidated codebase contents.
Supports packing repository contents into Markdown-formatted files, providing a structured and readable way for AI systems to consume entire codebases.
Supports packing repository contents into XML-formatted files, offering a machine-readable structure that includes file summaries and metadata.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Repomix MCP Serverpack https://github.com/expressjs/express using xml style and compression"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Repomix MCP Server
A Model Context Protocol (MCP) server that provides access to the repomix tool for packing repositories into AI-friendly files.
Security
Input paths: The server restricts file access to the directory from which it was started. Any attempts to access files outside this directory (like
/etc/) will be denied.Output files: All output is written to the system's temporary directory and automatically cleaned up after the contents are returned.
Remote URLs: Remote repository URLs are still allowed for processing.
Installation
Usage
Claude Code
Claude Desktop
Add this server to your MCP client configuration in your claude_desktop_config.json:
Available Tools
Both tools accept the same parameters:
Parameters
Parameter | Type | Required | Description | Examples |
| string | No | Directory path to pack |
|
| enum | No | Output format style |
|
| boolean | No | Compress output to reduce token count |
|
| string | No | Files to include (glob pattern) |
|
| string | No | Files to exclude (glob pattern) |
|
| string | No | Remote repository URL to process |
|
repomix-estimate
Estimate the size of repomix output without retrieving the content. Use this first to check if the output will fit in your context window.
Returns:
File size in KB/MB
Estimated token count (~4 characters per token)
Whether compression is enabled
repomix-estimate output
repomix
Pack a repository into a single, AI-friendly file. Returns the contents of the generated file.
Best Practice: Always use repomix-estimate first to check the output size, then use repomix with appropriate parameters (especially compress=true for large repos).
Example usage in Claude:
First check size:
use repomix-estimate toolIf size is reasonable:
use repomix toolIf too large, try with compression:
use repomix-estimate tool with compress=trueThen retrieve:
use repomix tool with compress=true
Workflow: Always estimate first, then retrieve only if the size fits your needs.