Greply MCP Server

Greply MCP Server

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.

Category
Visit Server

README

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:

Field Type Description
query string Search term (required)
target string File or directory (default ".")
before integer Lines of context before match (-B)
after integer Lines of context after match (-A)
recursive boolean Recurse directories (-R)
wholeWord boolean Match whole words (-w)
matchCase boolean Case-sensitive match (-c)
fixedStrings boolean Fixed-string match (-F)
suppressErrors boolean Return stdout/stderr on non-zero exit

greply.help

Display greply usage information.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured