repomix-reader
A simple Model Context Protocol (MCP) server for reading and grep-searching Repomix output files. This MCP provides secure file access by restricting operations to a pre-selected set of Repomix output files specified at startup.
claude mcp add --transport stdio wolfgang-check24-repomix-reader-mcp npx repomix-reader-mcp /path/to/first-repomix-output.xml /path/to/second-repomix-output.xml
How to use
Repomix Reader MCP provides a secure, ID-based interface to read and grep search Repomix output files. At startup you specify which Repomix output files should be accessible, and the MCP server assigns numeric IDs to those files for subsequent operations. You can list the available files, read sections by line range, and perform grep-like pattern searches with optional context around matches. This design makes it easy to integrate into MCP clients without exposing raw file paths. To use it, configure an MCP client to point at this server using the available file IDs, then issue the provided tools (list_repomix_files, read_repomix_output, grep_repomix_output) via the MCP protocol to interact with the files you approved at startup. The server supports outputs in various formats (XML, Markdown, plain text) as generated by Repomix, and enforces access only to the pre-approved set.
You can start by listing available files after initialization to confirm the IDs and descriptions, then read specific sections of a file by ID and line range, or run a regex search across a file with optional context lines. The grep tool supports standard JavaScript regular expressions and lets you tune contextLines and maxMatches to control output volume. This setup is particularly helpful for automated analyses or integration into a larger data-processing pipeline where exposing full file paths would be undesirable.
How to install
Prerequisites:
- Node.js (recommended LTS) and npm installed on your system
- Access to the MCP project repository and network to install dependencies
Step-by-step installation:
-
Install dependencies
npm install -
Build the project (transpile TypeScript to JavaScript or prepare production assets)
npm run build -
Run the MCP server (example) You can run directly via Node after build, or use npx as described in the usage section.
- If running directly from the built output:
node build/index.js /path/to/repomix-output1.xml /path/to/repomix-output2.xml
- If running directly from the built output:
-
(Optional) Run in development mode (if a dev script is provided) and verify the server starts correctly:
npm run dev
Notes:
- Ensure at least one Repomix output file path is provided when starting the server.
- The server will restrict access to the provided files and will not traverse other paths.
Additional notes
Tips and considerations:
- At startup, pass all Repomix output files you want to expose to the MCP; only these will be accessible via the MCP tools.
- Use list_repomix_files to retrieve IDs and descriptions before attempting read or grep operations.
- When grep-ing, tune contextLines to balance readability and output volume, and set maxMatches to avoid excessive results in large files.
- If you need to rotate available files, restart the MCP server with an updated list of allowed files.
- Security: The MCP server is designed to restrict file access to the pre-approved list; do not expose the server to untrusted clients.
- Supported file formats include XML, Markdown, and plain text; the tools operate on the content regardless of format as long as it is treated as readable text.
Related MCP Servers
mcp-graphql
Model Context Protocol server for GraphQL
mcp-google-map
A powerful Model Context Protocol (MCP) server providing comprehensive Google Maps API integration with LLM processing capabilities.
systemprompt-code-orchestrator
MCP server for orchestrating AI coding agents (Claude Code CLI & Gemini CLI). Features task management, process execution, Git integration, and dynamic resource discovery. Full TypeScript implementation with Docker support and Cloudflare Tunnel integration.
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
rohlik
MCP server that lets you shop groceries across the Rohlik Group platforms (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro)
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.