repomix-mcp
Allows packing GitHub repositories into AI-friendly formats without cloning, enabling remote repository analysis and pattern search.
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-mcpPack this repository as markdown and summarize its structure"
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
π Installation Guide β quick start, manual setup, and troubleshooting
Pack repositories into AI-friendly formats for comprehensive codebase analysis
A Model Context Protocol (MCP) server that integrates Repomix to provide AI assistants with powerful repository analysis capabilities.
Quick Start
git clone https://github.com/sandraschi/repomix-mcp
cd repomix-mcp
justThis opens an interactive dashboard showing all available commands. Run just bootstrap to install dependencies, then just serve or just dev to start.
Manual Setup
If you don't have just installed:
Related MCP server: git-context-mcp
Features
Repository Packing: Convert entire repositories into AI-friendly formats (XML, Markdown, JSON, Plain text)
Intelligent Compression: Tree-sitter based compression (~70% token reduction)
Content Analysis: Read and analyze packed repository output
Pattern Search: Search for specific code patterns within packed repositories
Remote Repository Support: Pack GitHub repos without cloning
Security Scanning: Built-in Secretlint integration
Prerequisites
Python 3.9+
Node.js 18+ (for Repomix)
Repomix: Install globally with
npm install -g repomix
Installation
Prerequisites
uv installed (RECOMMENDED)
Python 3.12+
Quick Start
Run immediately via uvx:
uvx repomix-mcpClaude Desktop Integration
Add to your claude_desktop_config.json:
"mcpServers": {
"repomix-mcp": {
"command": "uv",
"args": ["--directory", "D:/Dev/repos/repomix-mcp", "run", "repomix-mcp"]
}
}Installation
Prerequisites
uv installed (RECOMMENDED)
Python 3.12+
Quick Start
Run immediately via uvx:
uvx repomix-mcpClaude Desktop Integration
Add to your claude_desktop_config.json:
"mcpServers": {
"repomix-mcp": {
"command": "uv",
"args": ["--directory", "D:/Dev/repos/repomix-mcp", "run", "repomix-mcp"]
}
}Option 2: Docker
docker compose up -dOption 3: MCPB Package
# Build MCPB package
.\scripts\build-mcpb.ps1
# Install with MCPB
mcpb install dist\repomix-mcp.mcpbConfiguration
Cursor IDE Setup
Add to your Cursor MCP configuration:
{
"mcpServers": {
"repomix": {
"command": "python",
"args": ["D:/Dev/repos/repomix-mcp/src/repomix_mcp/server.py"],
"env": {
"PYTHONPATH": "D:/Dev/repos/repomix-mcp/src"
}
}
}
}Claude Desktop Setup
Add to your claude_desktop_config.json:
{
"mcpServers": {
"repomix": {
"command": "python",
"args": ["D:/Dev/repos/repomix-mcp/src/repomix_mcp/server.py"],
"env": {
"PYTHONPATH": "D:/Dev/repos/repomix-mcp/src"
}
}
}
}Usage
Once configured, the following MCP tools become available to AI assistants:
pack_repository
Pack a repository into an AI-friendly format.
Parameters:
repository_path: Path to the repository to packoutput_file: Output file path (optional)style: Format - "xml", "markdown", "json", "plain"include_patterns: Glob patterns to includeignore_patterns: Glob patterns to ignorecompress: Enable Tree-sitter compression
read_packed_output
Read and analyze packed repository output.
Parameters:
packed_file_path: Path to the packed output filemax_lines: Maximum lines to return
search_packed_output
Search for patterns within packed repository output.
Parameters:
packed_file_path: Path to the packed output filequery: Search query/patterncase_sensitive: Case sensitive search
list_supported_formats
List supported output formats and compression options.
Examples
Pack Current Repository
"Pack the current repository and analyze its structure"Pack with Specific Format
"Pack the src/ directory as markdown with compression enabled"Search for Patterns
"Find all authentication-related code in this repository"Analyze Dependencies
"Pack the package.json and requirements.txt files and analyze dependencies"Development
Running Locally
# Activate virtual environment
venv\Scripts\activate
# Run the MCP server
python src/repomix_mcp/server.pyTesting
# Install test dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run specific test
pytest tests/test_pack_repository.py -vCode Quality
# Lint
ruff check .
# Format
ruff format .
# Type check
mypy src/Architecture
repomix-mcp/
src/repomix_mcp/
server.py # Main FastMCP server
__init__.py # Package initialization
cli.py # Command-line interface
mcpb/
manifest.json # MCP server manifest
mcpb.json # Build configuration
tests/ # Test suite
docs/ # Documentation
docker-compose.yml # Docker setupAPI Reference
FastMCP Tools
All tools return structured responses with success boolean and contextual message fields.
Error Handling
Invalid repository paths return descriptive error messages
Missing Repomix installation is detected and reported
File permission issues are handled gracefully
Network timeouts for remote repositories are managed
Response Format
{
"success": true,
"message": "Operation completed successfully",
"data": { ... } # Tool-specific results
}Security
No sensitive data exposure: Packed output excludes common secret files
Safe remote repository access: HTTPS-only for Git operations
Local execution: All operations run locally, no external API dependencies
Input validation: All paths and parameters are validated before processing
Performance
Efficient compression: Tree-sitter provides ~70% token reduction
Streaming output: Large repositories are processed without excessive memory usage
Caching support: Packed outputs can be cached for repeated analysis
Parallel processing: Multiple repositories can be processed concurrently
Contributing
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
π‘οΈ Industrial Quality Stack
This project adheres to SOTA 14.1 industrial standards for high-fidelity agentic orchestration:
Python (Core): Ruff for linting and formatting. Zero-tolerance for
printstatements in core handlers (T201).Webapp (UI): Biome for sub-millisecond linting. Strict
noConsoleLogenforcement.Protocol Compliance: Hardened
stdout/stderrisolation to ensure crash-resistant JSON-RPC communication.Automation: Justfile recipes for all fleet operations (
just lint,just fix,just dev).Security: Automated audits via
banditandsafety.
License
MIT License - see LICENSE file for details.
Acknowledgments
Repomix by Yamadashy for the core repository packing technology
[FastMCP](https://FastMCP 3.1.0com/) for the MCP framework
Anthropic for the Model Context Protocol specification
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyβ¦
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides intelligent code context and analysis through semantic compression, AST parsing, and multi-language support. Offers 60-80% token reduction while enabling AI assistants to understand codebases through local analysis, OpenAI-enhanced insights, and GitHub repository integration.6223MIT
- FlicenseBqualityDmaintenanceProvides AI coding agents with structured Git repository context including project state, code structure, activity, and risk analysis without modifying or uploading code.53-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access live GitHub repository data without cloning, supporting repo summarization, file explanation, recent changes, and dependency analysis.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to fetch and pack the most relevant files from any GitHub repository for a given query, within token limits. Works with Claude Desktop, Cursor, Windsurf, and VS Code Copilot.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandraschi/repomix-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server