home / mcp / greply mcp server
greply-mcp
Configuration
View docs{
"mcpServers": {
"anthonyruffino-greply-mcp": {
"command": "node",
"args": [
"/absolute/path/to/greply-mcp-server/server.mjs"
],
"env": {
"greply_CMD": "/usr/local/bin/greppy"
}
}
}
}You run a greply MCP Server to expose the greply CLI through an MCP-compatible client, letting you search code and texts with familiar greply features directly from your MCP environment. This server wraps the greply node wrapper so you can perform searches and view usage quickly from your client workflows.
Start by running the server from your environment, then configure your MCP client to connect to it. The server provides two main actions you can invoke: greply.search to query files with context and flags, and greply.help to display usage information for greply. Use the MCP client to invoke these tools as you would with any other MCP tool.
Prerequisites you need to have before installation:
Clone the project 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 installStart the server to run locally during development or testing:
node server.mjs
```
Or use npm to start if a script is provided in your setup:npm startConfigure your MCP client to load the server as an MCP entry. The following example shows how to reference the local server file directly from your MCP settings.
{
"mcpServers": {
"greply": {
"command": "node",
"args": ["/absolute/path/to/greply-mcp-server/server.mjs"],
"env": {
"greply_CMD": "/usr/local/bin/greppy"
}
}
}
}Search files or directories with the given query and optional flags, including context before/after matches and various matching options.
Display greply usage information.