Repomix MCP Server
Model Context Protocol Server for Repomix - Pack and analyze codebases for AI consumption
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Repomix MCP Server. The extension's id is mcp-server-repomix.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Repomix MCP Server for Zed
A Zed extension that integrates Repomix as a Model Context Protocol (MCP) server, enabling AI assistants to pack and analyze entire codebases.
Features
- Repository Packing: Pack local or remote repositories into a single AI-friendly file
- MCP Integration: Seamlessly integrates with Zed's Assistant through the Model Context Protocol
- Flexible Configuration: Support for custom Repomix paths and settings
- AI-Optimized Output: Generates comprehensive codebase context for AI analysis
What is Repomix?
Repomix is a powerful tool that packs your entire repository into a single file optimized for AI consumption. It's particularly useful for:
- Providing comprehensive codebase context to AI assistants
- Analyzing repository structure and dependencies
- Creating shareable codebase snapshots for AI analysis
- Supporting multiple output formats (XML, Markdown, Plain text)
Prerequisites
Before using this extension, you need to have:
- Zed Editor: Version with MCP support
- Node.js: Required for running Repomix
- Repomix: Install globally with:
npm install -g repomix
Installation
From Zed Extension Marketplace
- Open Zed
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Linux/Windows) - Type "zed: extensions" and select it
- Search for "Repomix MCP Server"
- Click "Install"
From Source
-
Clone this repository:
git clone https://github.com/mlopezgez/zed-mcp-server-repomix.git cd zed-mcp-server-repomix -
Build the extension:
cargo build --release -
Install in Zed:
# Copy to Zed extensions directory mkdir -p ~/.config/zed/extensions cp -r . ~/.config/zed/extensions/mcp-server-repomix
Configuration
Basic Setup
Add the following to your Zed settings (~/.config/zed/settings.json):
{
"context_servers": {
"mcp-server-repomix": {}
}
}
Custom Repomix Path (Optional)
If you have Repomix installed in a custom location:
{
"context_servers": {
"mcp-server-repomix": {
"settings": {
"repomix_path": "/custom/path/to/repomix"
}
}
}
}
Remote Repositories
Repomix can pack remote repositories by providing a repository URL. Simply pass the repository URL using either HTTPS (e.g., https://github.com/user/repo) or SSH (e.g., git@github.com:user/repo.git) to the pack repository tool.
Usage
Once installed and configured, the Repomix MCP server will be available in your Zed Assistant. The assistant can use Repomix tools to:
- Pack repositories: Convert entire codebases into AI-friendly format
- Analyze code structure: Understand repository organization and dependencies
- Search packed output: Find specific patterns and code elements
- Read packed content: Extract specific files or sections from packed repositories
Example Prompts
Try these prompts with your Zed Assistant:
- "Pack the current repository and show me an overview"
- "Analyze the structure of repository https://github.com/yamadashy/repomix"
- "Pack only the TypeScript files in the src directory"
- "Find all authentication-related code in this repository"
Available MCP Tools
The extension provides the following MCP tools to the Zed Assistant:
pack_repository: Pack a local or remote repositoryread_packed_output: Read and analyze packed repository outputsearch_packed_output: Search for specific patterns in packed output
Development
Building from Source
# Install Rust if you haven't already
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone https://github.com/mlopezgez/zed-mcp-server-repomix.git
cd zed-mcp-server-repomix
cargo build --release
Project Structure
zed-mcp-server-repomix/
├── src/
│ └── mcp_server_repomix.rs # Main extension implementation
├── configuration/
│ ├── installation_instructions.md
│ └── default_settings.jsonc
├── Cargo.toml # Rust dependencies
├── extension.toml # Zed extension metadata
└── README.md
Troubleshooting
Server Not Starting
If the MCP server fails to start:
- Verify Repomix is installed:
repomix --version - Check Node.js is installed:
node --version - Ensure the extension is enabled in Zed settings
- Restart Zed after configuration changes
Permission Issues
If you encounter permission errors:
- Ensure you have write permissions in the project directory
- Verify Repomix can execute:
which repomix - Check Node.js permissions
Debug Mode
Enable debug logging in Zed to see detailed MCP server output:
{
"assistant": {
"debug": true
}
}
Related Projects
- Repomix - The core repository packing tool
- Zed - The editor this extension runs in
- Model Context Protocol - The protocol specification
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Repomix by @yamadashy for the excellent repository packing tool
- Zed team for the extensible editor and MCP support
- Context7 MCP Server for reference implementation