Exposes the system grep binary functionality through MCP, allowing for searching patterns in files using regular expressions, with support for case-insensitive matching, context lines, maximum match count, fixed string matching, and recursive directory searching.
Mentioned as part of the development workflow, but not as a primary integration target for the MCP server.
Used for implementation and client access, but not as a primary integration target for the MCP server.
MCP-Grep
A grep server implementation that exposes grep functionality through the Model Context Protocol (MCP).
Installation
Usage
MCP-Grep runs as a server that can be used by MCP-compatible clients:
The 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:
Natural Language Prompts
MCP-Grep understands natural language prompts, making it easier to use with LLMs. Examples:
MCP Inspector Integration
MCP-Grep includes an MCP Inspector integration for interactive debugging and testing:
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
License
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A server implementation that exposes grep functionality through the Model Context Protocol, allowing MCP-compatible clients to search for patterns in files using regular expressions.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.Last updated -126155MIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for querying the CVE-Search API. This server provides comprehensive access to CVE-Search, browse vendor and product、get CVE per CVE-ID、get the last updated CVEs.Last updated -652MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides tools to find regex pattern positions in files and list allowed directories, enabling text analysis with LSP-like functionality.Last updated -2MIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that scrapes, indexes, and searches documentation for third-party software libraries and packages, supporting versioning and hybrid search.Last updated -189599MIT License