mcp-grep
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-grepFind 'TODO' case-insensitively in the src directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-Grep
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 claudeManual Installation
pip install mcp-grepRelated MCP server: 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-inspectorThe server exposes the following MCP functionality:
Resource:
grep://info- Returns information about the system grep binaryTool:
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 resultsMCP Inspector Integration
MCP-Grep includes an MCP Inspector integration for interactive debugging and testing:
# Start the MCP Inspector with MCP-Grep
mcp-grep-inspectorThis 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
pytestLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Podcast database for guest booking, PR, sponsorship research and podcast marketing: 3M+ podcasts and 100M+ episodes from public RSS feeds, Apple Podcasts, Spotify and YouTube, with the guests and sponsors of recent episodes. Search shows by category, language, audience size (Apple and Spotify ratings, social followers, YouTube subscribers, chart positions), guests, sponsors, publishing rhythm and whether a contact email is on file. Find the podcasts a person has been a guest on or a brand sponsors, search episodes that mention a brand, product or person and read their full show notes, check today's Apple Podcasts and Spotify charts by country and category, read Apple Podcasts reviews and find shows similar to one you like. Get contact emails for the shows you want to reach and save shows to your Grep.FM lists to review and export. Remote MCP server with OAuth for Claude, ChatGPT, Cursor, Codex and other MCP clients. Requires a Grep.FM Pro or Team plan.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides ripgrep search capabilities to MCP clients like Claude, allowing high-performance text searches across files on your system.5549 npm78MIT
- AlicenseNot gradedqualityCmaintenanceA server implementation that exposes grep functionality through the Model Context Protocol, allowing MCP-compatible clients to search for patterns in files using regular expressions.24GPL 3.0
- AlicenseBqualityCmaintenanceEnables file and directory searching through the greply CLI tool with configurable search options like context lines, case sensitivity, and pattern matching. Provides direct access to powerful grep-like functionality from MCP-compatible clients.25 npmMIT
- AlicenseAqualityDmaintenanceProvides ripgrep search capabilities to MCP clients like Claude, enabling high-performance text searches across files on your system.518 npmMIT