home / mcp / ripgrep mcp server
An MCP server to wrap ripgrep
Configuration
View docs{
"mcpServers": {
"mcollina-mcp-ripgrep": {
"command": "npx",
"args": [
"-y",
"mcp-ripgrep@latest"
]
}
}
}You have a dedicated MCP server that exposes ripgrep search capabilities to MCP clients. It lets you perform fast text searches across files on your machine from any MCP-enabled tool, enabling powerful, targeted queries with patterns, file types, and path constraints.
Connect any MCP client that supports the Model Context Protocol to perform ripgrep searches. You can run basic searches to find a pattern, or use advanced options to refine results by file type, path, and other ripgrep flags. Common workflows include locating code references, scanning for TODOs, and counting matches across a project.
Prerequisites you need on your machine before starting:
- Node.js (v18 or higher)
- ripgrep (rg) installed and available in your PATH
Step by step commands you can run to set up the MCP ripgrep server on your machine:
Install ripgrep on macOS (if you use Homebrew):
brew install ripgrep
Install Node.js v18+ from your preferred source (official installers or package managers).
Install the MCP server package via npx when you are ready to run locally. The standard local (stdio) startup uses npx to launch the server package.
{
"mcpServers": {
"ripgrep": {
"command": "npx",
"args": ["-y", "mcp-ripgrep@latest"]
}
}
}Basic ripgrep search to find a pattern within a specified path.
Advanced ripgrep search with options such as FixedStrings, FileType, IncludeHidden, and more to refine results.
Count occurrences of a given pattern, with optional line counting.
List files that would be searched without performing the actual search.
List all supported file types that ripgrep can recognize.