Skip to main content
Glama

Greply MCP Server

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 — run greply with query, before/after context, and flags.
  • greply.help — print greply usage text.

Requirements

  • Node.js 20 or newer (22 LTS recommended)
  • npm or pnpm for dependency installation
  • greply CLI available on PATH, or specify greply_CMD env var

Installation

Clone and install dependencies:

git clone https://github.com/your-org/greply-mcp-server.git cd greply-mcp-server # Make sure Node version is >= 20 node -v # If needed: # curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # source ~/.nvm/nvm.sh # nvm install 22 && nvm use 22 npm install

Usage

Run the server directly:

node server.mjs

Or with npm:

npm start

Gemini CLI Configuration

Add this to your ~/.gemini/settings.json:

{ "mcpServers": { "greply": { "command": "node", "args": ["/absolute/path/to/greply-mcp-server/server.mjs"], "env": { "greply_CMD": "/usr/local/bin/greppy" } } } }
  • greply_CMD is optional — only set it if the server cannot find greply automatically.
  • Use an absolute path for server.mjs.

Tools

greply.search

Search files or directories with the given query and optional flags.

Input schema:

FieldTypeDescription
querystringSearch term (required)
targetstringFile or directory (default ".")
beforeintegerLines of context before match (-B)
afterintegerLines of context after match (-A)
recursivebooleanRecurse directories (-R)
wholeWordbooleanMatch whole words (-w)
matchCasebooleanCase-sensitive match (-c)
fixedStringsbooleanFixed-string match (-F)
suppressErrorsbooleanReturn stdout/stderr on non-zero exit

greply.help

Display greply usage information.

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

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.

  1. Features
    1. Requirements
      1. Installation
        1. Usage
          1. Gemini CLI Configuration
            1. Tools
              1. greply.search
              2. greply.help

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              Enables 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 -
              1
              37
              TypeScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              MCP server for using various search tools like Tavily API. Planning to support various search tools (i.e. wiki search, searxng, etc)
              Last updated -
              3
              Python
              MIT License
              • Apple
              • Linux
            • A
              security
              A
              license
              A
              quality
              Provides ripgrep search capabilities to MCP clients like Claude, allowing high-performance text searches across files on your system.
              Last updated -
              5
              743
              18
              JavaScript
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              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.
              Last updated -
              11
              Python
              GPL 3.0

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnthonyRuffino/greply-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server