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.
Related MCP Servers
- AsecurityFlicenseAqualityEnables 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 -44
- -securityAlicense-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
- AsecurityAlicenseAqualityProvides ripgrep search capabilities to MCP clients like Claude, allowing high-performance text searches across files on your system.Last updated -515941MIT License
- -securityAlicense-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 -20GPL 3.0