Repomix
Packs code repositories into a single, AI-friendly file using the repomix tool.
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
npm install
npm run build
Usage
Claude Code
claude mcp add --scope user repomix node /path/to/repomix-mcp/dist/index.js
Claude Desktop
Add this server to your MCP client configuration in your claude_desktop_config.json:
{
"mcpServers": {
"repomix": {
"command": "node",
"args": ["/path/to/repomix-mcp/dist/index.js"]
}
}
}
Available Tools
Both tools accept the same parameters:
Parameters
| Parameter | Type | Required | Description | Examples |
|---|---|---|---|---|
path | string | No | Directory path to pack | /path/to/repo |
style | enum | No | Output format style | xml, markdown, plain |
compress | boolean | No | Compress output to reduce token count | true, false |
include | string | No | Files to include (glob pattern) | *.md,*.ts,*.js, *.py, src/**/*.go |
ignore | string | No | Files to exclude (glob pattern) | *test*,*spec*,dist/**,build/** |
remote | string | No | Remote repository URL to process | https://github.com/user/repo |
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 output size estimate:
- Size: 5.27 KB (0.01 MB)
- Estimated tokens: ~1,349
- Compression: disabled
Use the repomix tool with these same parameters to retrieve the actual content.
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 tool - If size is reasonable:
use repomix tool - If too large, try with compression:
use repomix-estimate tool with compress=true - Then retrieve:
use repomix tool with compress=true
Workflow: Always estimate first, then retrieve only if the size fits your needs.
repomix output (first 15 lines)
This file is a merged representation of a subset of the codebase, containing specifically included files, combined into a single document by Repomix.
<file_summary>
This section contains a summary of this file.
<purpose>
This file contains a packed representation of the entire repository's contents.
It is designed to be easily consumable by AI systems for analysis, code review,
or other automated processes.
</purpose>
<file_format>
The content is organized as follows:
1. This summary section
2. Repository information
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MCP Server for Drupal
A TypeScript-based MCP server that acts as a companion to the Drupal MCP module, communicating via STDIO.
MCP Expert Server
An MCP server for query generation and documentation assistance using Claude AI.
Agent Evals by Galileo
Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server
Figma to React Native MCP
Convert Figma designs into React Native components.
Tauri Development MCP Server
Build, test, and debug mobile and desktop apps with the Tauri framework faster with automated UI interaction, screenshots, DOM state, and console logs from your app under development.
Tailwind Svelte Assistant
Provides documentation and code snippets for SvelteKit and Tailwind CSS.
Remote MCP Server (Authless)
An example of a remote MCP server without authentication, deployable on Cloudflare Workers or runnable locally.
Test MCP Server
A sample MCP server implemented in Node.js for development and testing purposes.
mcp-agent-kit
a complete and intuitive SDK for building MCP Servers, MCP Agents, and LLM integrations (OpenAI, Claude, Gemini) with minimal effort. It abstracts all the complexity of the MCP protocol, provides an intelligent agent with automatic model routing, and includes a universal client for external APIs all through a single, simple, and powerful interface. Perfect for chatbots, enterprise automation, internal system integrations, and rapid development of MCP-based ecosystems.
Remote MCP Server (Authless)
An example of a remote MCP server deployable on Cloudflare Workers, without authentication.