
Repomix MCP Server: Setup for Claude Code, Cursor and Other Apps
Lets Claude, Cursor and other assistants pack a local or GitHub repo into one file and search it.
Repomix packs a whole code folder or GitHub repo into a single file your assistant can read, search by pattern and read in pieces. Run with the --mcp option, it becomes a server that Claude, Cursor and other assistants call themselves, with no account. It can also turn a folder into a Claude skill. By default it can read any folder you can, so use the sandbox option for folders you do not trust.
Good for
- Developers who want Claude to understand a whole repo in one go
- Reviewers who want to search a GitHub repo without cloning it
- Claude Code users who want to turn a codebase into a reusable skill
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Repomix MCP
Claude Code
- 1
Copy this prompt.
Add the Repomix MCP server to Claude Code. Run this command: claude mcp add repomix -- npx -y repomix --mcp Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
Read-only mode: Add --sandbox after --mcp to limit the server to one folder and switch off remote packing, skill generation and attaching outputs.
The command ends in --mcp: without it Repomix runs once as a command-line tool and no server starts. Add --sandbox after it for the safer mode described under the tools. Git must be installed to pack GitHub repos. The README also shows a Docker version of the server as an alternative to npx. The README documents Claude Code, VS Code, Cline and Cursor; the other apps use the same command in their own config format.
From the project README. Source.
Tools
Packs a local folder into one file for the assistant to read
Bundles a code folder into a single file with a file tree and size metrics, in XML, Markdown, JSON or plain text. You can include or exclude files by pattern and shrink it by keeping only code signatures.
Try: “Pack /Users/me/projects/shop and tell me which files are largest.”
Files ·
pack_codebaseDownloads a GitHub repo and packs it into one file
Clones a GitHub repository (owner/repo or a full link, with an optional branch) and packs it the same way. It skips files that look like secrets, though the README calls that scan a best guess.
Try: “Pack the GitHub repo yamadashy/repomix and explain how it is organized.”
Network ·
pack_remote_repositoryOpens a packed file you made before
Registers an existing Repomix output file, or a folder holding one, so the assistant can read it without packing again. Not available in sandbox mode.
Try: “Use the repomix-output.xml in my project folder.”
Files ·
attach_packed_outputReads a packed file, or part of it by line range
Returns the contents of a packed output by its id. You can ask for a line range so a large file does not flood the chat.
Try: “Read lines 1 to 200 of that packed output.”
Read ·
read_repomix_outputSearches inside a packed file
Searches a packed output with a regular expression and shows matching lines with optional lines before and after, like grep.
Try: “Find every use of fetchUser in the packed output.”
Read ·
grep_repomix_outputTurns a code folder into a Claude skill
Creates a Claude Agent Skill from a folder: a SKILL.md plus reference files with a summary, the structure and file contents. It is written under .claude/skills inside that project. Not available in sandbox mode.
Try: “Generate a skill called myapp-reference from /Users/me/projects/myapp.”
Write ·
generate_skillReads one file inside the sandbox folder
Reads a single file. It only exists in sandbox mode, where it cannot reach outside the folder you chose.
Try: “Read src/index.ts.”
Files ·
file_system_read_fileLists a folder inside the sandbox folder
Lists the files and folders in a directory. It only exists in sandbox mode, where it cannot reach outside the folder you chose.
Try: “List the files in src/.”
Files ·
file_system_read_directory
Read from the source code
Permissions
medium risk · 4 things to watch · 5 advisories
Medium risk
By default the server can read any folder your user account can, and it trusts the repomix config file in the folder it packs, which is code. Add the sandbox option when the assistant may open folders you do not trust.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can read any folder you can read
Without the sandbox option, pack_codebase accepts any absolute path your user can open. Use the sandbox option or only point it at project folders. github.com
A repo's config file can run code
The README says a repomix config file is code and can run when loaded, so packing a cloned third-party repo is risky. Turn on the sandbox option to skip config files. github.com
Skill generation writes into your project
generate_skill creates files under the project's .claude/skills folder. Check the new folder before you commit it. github.com
Secret filtering is a best guess
Remote packing skips files that match known secret formats, but the README calls this a heuristic. Do not pack folders that hold keys you cannot share. github.com
Security advisories
5 known advisories, all fixed in a newer version.
- Repomix CLI executes repository-level git config helpers (gpg.program, diff.external, core.fsmonitor) when packing a directory with a crafted .githigh · Fixed in 1.18.1 · GHSA-4p5g-gh74-q524
- repomix Vulnerable to Command Injection (RCE) via --remote-branch Argument Injectionhigh · Fixed in 1.14.1 · GHSA-9mm9-rqhj-j5mx
- Cleartext Credential Exposure via Unredacted URL Logging in Remote Repository Processingmedium · Fixed in 1.18.0 · GHSA-w8cw-mgw9-74h7
- repomix: attach_packed_output can bypass file-read secret scanning for supported local filesmedium · Fixed in 1.14.1 · GHSA-hwpp-h97w-2h3j
- Repomix MCP file system tools claimed protections that were not implementedlow · Fixed in 1.18.0 · GHSA-rpmv-562j-qxrv
Technical details
| Turning on read-only | Start the server with --sandbox (optionally with a folder). File tools are limited to that folder, config files are not loaded, and remote packing, skill generation and attaching outputs are turned off. |
|---|---|
| Talks to | GitHub, only when you use the remote packing tool (it runs git) |
| Sign-in and keys | No account or key. Remote packing downloads public GitHub repositories with git. |
Questions
Is Repomix an MCP server or a command-line tool?
Both. The command-line tool packs a repo into one file. Started with the --mcp option it becomes a server, and the install box above already includes that option.
Do I need an API key?
No. It runs on your computer with no account. Remote packing needs git installed to download GitHub repos.
Can I run it read-only?
Yes. Add the sandbox option to the server command to limit it to one folder and turn off remote packing, skill generation and attaching outputs. This is software-level confinement, not an operating system sandbox.
Does it send my code anywhere?
Packing runs on your computer. The packed text goes to your assistant, so your assistant's provider sees whatever the assistant reads. The remote tool contacts GitHub.
Can I run it with Docker?
Yes. The README shows a Docker setup with the ghcr.io/yamadashy/repomix image and the --mcp option as an alternative to npx.
What does the packed file look like?
One file with a summary, a file tree and the code. You can choose XML, Markdown, JSON or plain text, and shrink it by keeping only code signatures.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
repomix- Registry
- npm
- Transport
- stdio
- Auth
- None
- Version
- 1.18.1
- License
- MIT
- Last commit
- Oct 31, 2026
- Open issues
- 114
- Listed in
- Official MCP registry
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 4Hide
- Repomix README: MCP Server Integration · github.com
- MCP server setup and tool registration · github.com
- generate_skill tool · github.com
- Git calls for remote repositories · github.com