MCP Directory

Repomix MCP Server

Official

Pack any local or remote repository into one AI-ready file your agent can grep and read incrementally.

Unverified
stdio (local)
No auth
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y repomix --mcp

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "repomix-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "repomix",
        "--mcp"
      ]
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Node.js with npx (or Docker for the ghcr.io/yamadashy/repomix image)
  • Git available on PATH for pack_remote_repository
  • No API key or account required

About Repomix MCP Server

Repomix's MCP mode solves a specific problem: getting a whole codebase into an LLM conversation without manually generating and uploading files. When an agent calls pack_codebase or pack_remote_repository, Repomix analyzes the structure, respects .gitignore plus custom include/ignore glob patterns, and emits a consolidated report. Output style is selectable (xml, markdown, json, plain), and the top-N largest files are surfaced in a metrics summary.

The retrieval design matters more than the packing. Instead of dumping a 500k-token file into context, the server returns an outputId; the agent then greps it (grep_repomix_output, JavaScript RegExp with -A/-B style context lines) or reads specific line ranges (read_repomix_output). This incremental flow is why the docs recommend leaving compress: false by default — you rarely need the whole thing at once.

For remote analysis, pack_remote_repository accepts user/repo shorthand, full GitHub URLs, or branch-specific tree URLs, and clones automatically. Docker users can run ghcr.io/yamadashy/repomix with the --mcp flag instead of npx. Claude Code users can register it with one command: claude mcp add repomix -- npx -y repomix --mcp.

The feature is flagged experimental by the maintainer and evolves with the CLI, but it inherits a mature core: Repomix itself is one of the most-starred code-packing tools and is actively released. Trade-off: packing giant monorepos still takes time and disk, and remote packing requires git access to the target repo.

Tools & capabilities (6)

pack_codebase

Package a local directory into a consolidated file with file tree, metrics, and optional Tree-sitter compression.

pack_remote_repository

Clone and package a GitHub repository (user/repo or URL, branch-aware) for analysis.

read_repomix_output

Read a generated output by ID, with optional startLine/endLine range for large files.

grep_repomix_output

Regex search (JavaScript RegExp) within a generated output, with context/before/after lines and case-insensitive option.

file_system_read_file

Read a local file by absolute path with Secretlint validation to block files containing secrets.

file_system_read_directory

List a directory by absolute path with [FILE]/[DIR] indicators.

What this server can do

Repomix MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Let an agent analyze an unfamiliar GitHub repo by packing it remotely and grepping for key functions
  • Feed a local monorepo subset (src/** only) to the model with include patterns
  • Code review prep: generate a compressed structural overview of a large codebase
  • Explore project structure safely in sandboxed environments without raw filesystem access

Quick setup

  1. 1Ensure Node.js is installed (npx comes with it)
  2. 2Add to Claude Code: claude mcp add repomix -- npx -y repomix --mcp
  3. 3Or add {"command": "npx", "args": ["-y", "repomix", "--mcp"]} under mcpServers in claude_desktop_config.json / cline_mcp_settings.json
  4. 4Restart the client and ask the agent to pack a directory or a GitHub repo
  5. 5Optional: use Docker instead — docker run -i --rm ghcr.io/yamadashy/repomix --mcp

Security notes

The server reads your local filesystem and clones remote repos, so scope it to machines where that is acceptable. Built-in Secretlint validation blocks reading files that contain detected secrets, and path validation prevents directory traversal — but packed output can still include any non-secret source you point it at.

Repomix MCP Server FAQ

Is Repomix MCP safe for private code?

Reasonably, with caveats. Everything runs locally (or in your Docker container) and nothing is uploaded by Repomix itself; its filesystem tools run Secretlint checks and refuse to read files with detected credentials. The packed output does end up in your LLM context, so the usual provider data policies apply.

Do I need to install Repomix globally first?

No. The documented config uses npx -y repomix --mcp, which fetches and runs the latest version on demand. The npm package repomix is the same binary the CLI uses.

How is this different from just giving the agent filesystem access?

Repomix produces a single structured artifact with a file tree, token metrics, and .gitignore-aware filtering, then lets the agent grep or read line ranges from it. That is cheaper and more deliberate than the agent walking directories file by file, and it works for remote GitHub repos too.

Alternatives to Repomix MCP Server

Compare all alternatives →

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 26 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 1 month agoRepo

Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.

Unverified
stdio (local)
No auth
C
14 tools
Updated 5 days agoRepo