Grep

by erniebrodeur

1 stars
2.7k downloads
Not rated
GitHub

About

Exposes the system grep binary's functionality for searching files with regular expressions, supporting common options like case-insensitive matching, context lines, and recursive directory searching.

Details

Author
erniebrodeur
Repository
erniebrodeur/mcp-grep
GitHub stars
1
Downloads
2,710
License
GNU General Public License v3.0
Categories
Developer Tools, Design, File Management, AI, Search, Infrastructure, Knowledge Base, Other

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Grep
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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


To install Grep Server for Claude Desktop automatically via Smithery:

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

bash
pip install mcp-grep

Using the MCP Python client:

python
from mcp.client import MCPClient

pip install -e ".[dev]"

grep

Searches for patterns in files using the system grep binary. Parameters: pattern (string), paths (array of strings), ignore_case (boolean, optional), recursive (boolean, optional)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "grep": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

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:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.