Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-ripgrep

MCP.Pizza Chef: mcollina

mcp-ripgrep is an MCP server that exposes the powerful ripgrep search tool via the Model Context Protocol. It enables MCP clients like Claude to perform fast, efficient text searches across local filesystems, leveraging ripgrep's speed and regex support. This server requires Node.js and the ripgrep command-line tool installed, providing seamless integration for real-time, context-aware search within AI workflows.

Use This MCP server To

Perform fast regex text searches across local filesystems Enable AI clients to query codebases or document collections Integrate high-speed search into AI-assisted development tools Automate extraction of relevant file snippets for context Support multi-file content discovery in real-time AI workflows

README

MCP Ripgrep Server

An MCP server that provides ripgrep (rg) search capabilities to any MCP client such as Claude.

Overview

This server provides a Model Context Protocol (MCP) interface for the powerful ripgrep search tool. It enables Claude AI and other MCP-compatible clients to perform high-performance text searches across files on your system.

Prerequisites

  • Node.js (v18 or higher)
  • ripgrep (rg) command installed and available in your PATH. Install it with brew install ripgrep on macOS.

Usage with Claude for Desktop

To use this MCP server with Claude for Desktop:

  1. Edit your Claude for Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the following to your configuration:

    {
      "mcpServers": {
        "ripgrep": {
          "command": "npx",
          "args": ["-y", "mcp-ripgrep@latest"]
        }
      }
    }

    Replace /path/to/mcp-ripgrep with the absolute path to where you cloned this repository.

  3. Restart Claude for Desktop.

Available Tools

search

Basic search with ripgrep:

Pattern: error
Path: ./src

advanced-search

More advanced search with additional options:

Pattern: function
Path: ./src
FixedStrings: true
FileType: ts
IncludeHidden: false

count-matches

Count occurrences of a pattern:

Pattern: TODO
Path: ./src
CountLines: true

list-files

List files that would be searched without actually searching them:

Path: ./src
FileType: js

list-file-types

List all supported file types in ripgrep.

Security Considerations

This MCP server executes shell commands using the ripgrep tool. While efforts have been made to safely escape arguments, use caution when providing input as it runs commands on your machine.

License

MIT

mcp-ripgrep FAQ

How do I install the mcp-ripgrep server?
Ensure Node.js v18+ and ripgrep are installed, then run the server via npx or npm.
Can mcp-ripgrep work with different MCP clients?
Yes, it supports any MCP-compatible client like Claude or others.
What platforms does mcp-ripgrep support?
It works on macOS, Windows, and Linux where ripgrep and Node.js are available.
How do I configure mcp-ripgrep with Claude for Desktop?
Add the mcp-ripgrep server details to Claude's configuration JSON file as documented.
Does mcp-ripgrep support complex regex queries?
Yes, it leverages ripgrep's full regex capabilities for advanced search patterns.
Is mcp-ripgrep secure to use with sensitive files?
It runs locally, so file access is limited to your system permissions, ensuring data privacy.
Can I customize search parameters in mcp-ripgrep?
Yes, you can pass ripgrep command-line options through the MCP interface.
What LLM providers can use mcp-ripgrep?
It works with OpenAI, Anthropic Claude, and Google Gemini clients supporting MCP.