Back to Home
ZebraRoy icon

repo-reader-mcp

by ZebraRoy

Overview

Provides LLMs and agents with targeted and efficient access to specific parts of a repository, acting as a context management protocol.

Installation

Run Command
npx -y repo-reader-mcp --name=my-repo --repo-path=https://github.com/user/repo --personal-token=your-token

Security Notes

The server has a critical ReDoS (Regular Expression Denial of Service) vulnerability in the `search` function (`src/utils/search.ts`). If the `regex` parameter is set to `true`, the user-provided `query` string is used directly to construct a regular expression without sanitization. An attacker could craft a malicious regex (e.g., `(a+)+b`) to cause catastrophic backtracking, leading to high CPU usage and a denial of service for the server. Additionally, while the `simple-git` library handles token insertion for various git hosts, passing `--personal-token` via CLI arguments means the token could be visible in process listings or logs, although this is common practice for CLI tools. The cloning of arbitrary repositories to a temporary directory could also pose risks if subsequent actions were to execute code from a malicious repo, but this server primarily reads files.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens1500
Stars0
Forks0
Last Update2025-11-28

Tags

LLM ToolsRepository AccessCode UnderstandingContext ManagementMCP