1. Conduid
  2. Developer Tools
  3. mcp-grep
MCP server · Developer Tools

mcp-grep

simple mcp server to wrap the local instance of grep.

Unclaimed GPL-3.0 last commit a year ago anthropicdevtoolsmcp-servervscodemcp
59Fair

Scored 21 hours ago · breakdown

About mcp-grep

mcp-grep is an MCP server published by erniebrodeur in the Developer Tools category: simple mcp server to wrap the local instance of grep. It has been installed 0 times through Conduid.

The repository has 24 stars and 5 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx mcp-grep

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about mcp-grep

Powered by Claude · Grounded in docs

I know everything about mcp-grep. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.2.1v0.2.1 · 8 Apr 2025What's Changed Deployment: Dockerfile and Smithery config by @calclavia in https://github.com/erniebrodeur/mcp-grep/pull/1 New Contributors @calclavia made their first contribution in https://github.com/erniebrodeur/mcp-grep/pull/1 Full…
v0.2.0v0.2.0 · 5 Apr 2025Full Changelog**: https://github.com/erniebrodeur/mcp-grep/compare/v0.1.1...v0.2.0
v0.1.1v0.1.1 · 21 Mar 2025

README

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

README mirrored from the source repository 21 hours ago. The original is authoritative.

Questions

About mcp-grep

How do I install mcp-grep?

Run npx mcp-grep, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is mcp-grep safe to use with an AI agent?

Its trust score is 59 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is mcp-grep still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.