MCP-Grep: a grep server for the Model Context Protocol

MCP-Grep: a grep server for the Model Context Protocol

mcp-grep•byerniebrodeur

MCP-Grep runs as an MCP server that exposes grep-based pattern searching over files and a resource providing information about the system grep binary.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes a grep tool that searches for patterns in files using the system grep binary.
  • •Provides a grep://info resource returning information about the system grep binary.
  • •Supports grep options such as case-insensitive matching, context lines, maximum match count, fixed string matching and recursive directory searching.
  • •Includes information about the system grep binary such as path, version and supported features.

BEST FOR

  • •Searching log files for patterns with case-insensitive matching and surrounding context lines.
  • •Recursively finding occurrences of a string across a source directory and its subdirectories.
  • •Limiting search results to a fixed number of matches across project files.

ABOUT MCP-GREP

MCP-Grep: a grep server for the Model Context Protocol is cataloged as an MCP server attributed to erniebrodeur. MCP-Grep runs as an MCP server that exposes grep-based pattern searching over files and a resource providing information about the system grep binary. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP-Grep: a grep server for the Model Context Protocol are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does MCP-Grep require a separate grep installation?

It uses the system grep binary and can report information about that binary, including its path, version and supported features.

Can MCP-Grep match fixed strings instead of regular expressions?

Yes, it supports fixed string matching for non-regex searches.

Upstream README

View this exact version on GitHub

README.md · 23eed69c04e5 · Fetched 2026-11-13 09:54:40 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MCP-Grep

smithery badge

A grep server implementation that exposes grep functionality through the Model Context Protocol (MCP).

Installation

Installing via Smithery

To install Grep Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @erniebrodeur/mcp-grep --client claude

Manual Installation

pip install mcp-grep

Usage

MCP-Grep runs as a server that can be used by MCP-compatible clients:

# Start the MCP-Grep server
mcp-grep-server

# Or use the MCP Inspector for interactive debugging and testing
mcp-grep-inspector

The server exposes the following MCP functionality:

  • Resource: grep://info - Returns information about the system grep binary
  • Tool: grep - Searches for patterns in files using the system grep binary

Features

  • Information about the system grep binary (path, version, supported features)
  • Search for patterns in files using regular expressions
  • Support for common grep options:
    • Case-insensitive matching
    • Context lines (before and after matches)
    • Maximum match count
    • Fixed string matching (non-regex)
    • Recursive directory searching
  • Natural language prompt understanding for easier use with LLMs
  • Interactive debugging and testing through MCP Inspector

Example API Usage

Using the MCP Python client:

from mcp.client import MCPClient

# Connect to the MCP-Grep server
client = MCPClient()

# Get information about the grep binary
grep_info = client.get_resource("grep://info")
print(grep_info)

# Search for a pattern in files
result = client.use_tool("grep", {
    "pattern": "search_pattern",
    "paths": ["file.txt", "directory/"],
    "ignore_case": True,
    "recursive": True
})
print(result)

Natural Language Prompts

MCP-Grep understands natural language prompts, making it easier to use with LLMs. Examples:

# Basic search
Search for 'error' in log.txt

# Case-insensitive search
Find all instances of 'WARNING' regardless of case in system.log

# With context lines
Search for 'exception' in error.log and show 3 lines before and after each match

# Recursive search
Find all occurrences of 'deprecated' in the src directory and its subdirectories

# Fixed string search (non-regex)
Search for the exact string '.*' in config.js

# Limited results
Show me just the first 5 occurrences of 'TODO' in the project files

# Multiple options
Find 'password' case-insensitively in all .php files, show 2 lines of context, and limit to 10 results

MCP Inspector Integration

MCP-Grep includes an MCP Inspector integration for interactive debugging and testing:

# Start the MCP Inspector with MCP-Grep
mcp-grep-inspector

This opens a web-based UI where you can:

  • Explore available resources and tools
  • Test grep operations with different parameters
  • View formatted results
  • Debug issues with your grep queries

Development

# Clone the repository
git clone https://github.com/erniebrodeur/mcp-grep.git
cd mcp-grep

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP-Grep: a grep server for the Model Context Protocol from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-grep)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools