New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

greply-mcp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

greply-mcp

MCP server wrapping the greply CLI

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

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.

Keywords

cli

FAQs

Package last updated on 11 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts