MCP Ripgrep Server
The MCP Ripgrep Server enables high-performance text searches using the ripgrep tool through an MCP interface. You can:
Search: Find patterns in files with options for context lines, colors, and case sensitivity
Advanced Search: Filter by file type, use fixed strings, set word boundaries, include hidden files
Count Matches: Count occurrences of patterns, with options to count lines instead of total matches
List Files: Show files that match search criteria without performing the actual search
List File Types: Display all file types supported by ripgrep
Provides specific configuration support for macOS users, with documented paths for Claude for Desktop configuration and installation instructions for ripgrep via Homebrew.
Integrates with Node.js environment to run the ripgrep search functionality, enabling the MCP server to execute high-performance text searches across the filesystem.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Ripgrep Server search for 'TODO' comments in my project's src directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: MCP Desktop Tools
Prerequisites
Node.js (v18 or higher)
ripgrep (
rg) command installed and available in your PATH. Install it withbrew install ripgrepon macOS.
Usage with Claude for Desktop
To use this MCP server with Claude for Desktop:
Edit your Claude for Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following to your configuration:
{ "mcpServers": { "ripgrep": { "command": "npx", "args": ["-y", "mcp-ripgrep@latest"] } } }Replace
/path/to/mcp-ripgrepwith the absolute path to where you cloned this repository.Restart Claude for Desktop.
Available Tools
search
Basic search with ripgrep:
Pattern: error
Path: ./srcadvanced-search
More advanced search with additional options:
Pattern: function
Path: ./src
FixedStrings: true
FileType: ts
IncludeHidden: falsecount-matches
Count occurrences of a pattern:
Pattern: TODO
Path: ./src
CountLines: truelist-files
List files that would be searched without actually searching them:
Path: ./src
FileType: jslist-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
Available Tools
5 toolsadvanced-searchC
Advanced search with ripgrep with more options
Inputs: pattern (required), path (required), caseSensitive, fixedStrings, +11 more.
count-matchesB
Count matches in files using ripgrep
Inputs: pattern (required), path (required), caseSensitive, filePattern, +2 more.
list-filesA
List files that would be searched by ripgrep without actually searching them
Inputs: path (required), filePattern, fileType, includeHidden.
list-file-typesA
List all supported file types in ripgrep
Inputs: no named parameters.
searchC
Search files for patterns using ripgrep (rg)
Inputs: pattern (required), path (required), caseSensitive, filePattern, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no ambiguity. 'search' is the basic search, 'advanced-search' adds more options, 'count-matches' focuses on counting, 'list-files' shows files without searching, and 'list-file-types' enumerates file types. The descriptions make it easy to tell them apart.
All tools follow a consistent verb_noun pattern with hyphens (e.g., 'advanced-search', 'count-matches'). The naming is predictable and readable throughout the set, with no deviations in style.
With 5 tools, the server is well-scoped for a ripgrep utility. Each tool earns its place by covering distinct aspects of searching and file listing, avoiding bloat while providing essential functionality.
The tool surface is nearly complete for a ripgrep server, covering search, advanced search, counting, and file listing. A minor gap might be the lack of a tool for managing search contexts or filtering results, but core workflows are well-covered.
Maintenance
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Search prompts, CLAUDE.md/AGENTS.md templates, Cursor rules, Agent Skills and MCP servers.
Agentic search over your Dewey document collections from any MCP-compatible client.
Search the HeyClaude directory of Claude Code agents, MCP servers, skills, and tools.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables 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.28 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables searching text across configured local workspaces using ripgrep. Provides secure text search capabilities within defined workspace boundaries through both MCP server and CLI interfaces.MIT
- AlicenseAqualityDmaintenanceProvides ripgrep search capabilities to MCP clients like Claude, enabling high-performance text searches across files on your system.56 npmMIT
- AlicenseNot gradedqualityDmaintenanceA grep server implementation that exposes grep functionality through the Model Context Protocol (MCP), supporting natural language prompts and common grep options such as case-insensitive matching, context lines, and recursive searching.GPL 3.0