Click on "Install 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., "@Greply MCP Serversearch for 'TODO' in src/ with 2 lines of context before and after"
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.
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.
Related MCP server: metasearch-mcp
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.