greply MCP Server
An MCP server that wraps the greply CLI (Node wrapper for the greppy search tool).
This allows you to use greply directly from an MCP-compatible client such as the Gemini CLI.
Features
greply.search— rungreplywith query, before/after context, and flags.greply.help— printgreplyusage text.
Requirements
Node.js 20 or newer (22 LTS recommended)
npmorpnpmfor dependency installationgreplyCLI available on PATH, or specifygreply_CMDenv var
Installation
Clone and install dependencies:
Usage
Run the server directly:
Or with npm:
Gemini CLI Configuration
Add this to your ~/.gemini/settings.json:
greply_CMDis optional — only set it if the server cannot findgreplyautomatically.Use an absolute path for
server.mjs.
Tools
greply.search
Search files or directories with the given query and optional flags.
Input schema:
Field | Type | Description |
| string | Search term (required) |
| string | File or directory (default
) |
| integer | Lines of context before match (
) |
| integer | Lines of context after match (
) |
| boolean | Recurse directories (
) |
| boolean | Match whole words (
) |
| boolean | Case-sensitive match (
) |
| boolean | Fixed-string match (
) |
| boolean | Return stdout/stderr on non-zero exit |
greply.help
Display greply usage information.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables 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.
Related MCP Servers
- Asecurity-licenseAqualityEnables integration of Google search functionality into MCP-enabled applications using the Serper API, providing rich search results, configurable parameters, and efficient response handling.Last updated -41
- -security-license-qualityMCP server for using various search tools like Tavily API. Planning to support various search tools (i.e. wiki search, searxng, etc)Last updated -3MIT License
- Asecurity-licenseAqualityProvides ripgrep search capabilities to MCP clients like Claude, allowing high-performance text searches across files on your system.Last updated -536638MIT License
- -security-license-qualityA server implementation that exposes grep functionality through the Model Context Protocol, allowing MCP-compatible clients to search for patterns in files using regular expressions.Last updated -15GPL 3.0