mcp-regex-server
by Vishwasa2004
Overview
This server provides a standardized interface (MCP) for performing regular expression searches within specified files, returning matching lines.
Installation
go run main.goSecurity Notes
The server allows searching arbitrary file paths (`file_path` argument) using a user-provided regex pattern (`pattern` argument). This introduces two significant risks if deployed in an untrusted environment or with untrusted input: 1. Local File Inclusion (LFI): An attacker could specify paths to sensitive system files (e.g., /etc/passwd) to extract their content. The current implementation only reads, not writes, files. 2. Regular Expression Denial of Service (ReDoS): Maliciously crafted complex regex patterns can consume excessive CPU resources, leading to a denial of service. There is no built-in input validation or sanitization for file paths or regex patterns.
Similar Servers
orla
Orla acts as a runtime for Model Context Protocol (MCP) servers, enabling the execution of lightweight open-source AI agents and command-line tools locally.
mcp-devtools
A high-performance MCP server providing a unified interface to essential developer tools, featuring OAuth 2.0/2.1 authorization and a multi-layered security framework.
mcp-maintainer-toolkit
This server provides a Model Context Protocol (MCP) interface with various tools and resources designed to assist in maintaining, testing, and developing MCP repositories and clients.
filesys
A secure MCP server providing filesystem operations with controlled access to specified directories for agent-based interactions.