MCP Ripgrep 服务器
为任何 MCP 客户端(例如 Claude)提供 ripgrep(rg)搜索功能的 MCP 服务器。
概述
该服务器为强大的ripgrep搜索工具提供了模型上下文协议 (MCP) 接口。它使 Claude AI 和其他兼容 MCP 的客户端能够在系统上的文件中执行高性能文本搜索。
先决条件
Node.js(v18 或更高版本)
ripgrep (
rg
) 命令已安装并添加到你的 PATH 中。在 macOS 上使用brew install ripgrep
命令安装。
与 Claude 桌面版一起使用
要将此 MCP 服务器与 Claude for Desktop 一起使用:
编辑 Claude for Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
将以下内容添加到您的配置中:
{ "mcpServers": { "ripgrep": { "command": "npx", "args": ["-y", "mcp-ripgrep@latest"] } } }将
/path/to/mcp-ripgrep
替换为您克隆此存储库的绝对路径。重新启动 Claude 桌面版。
可用工具
搜索
使用 ripgrep 进行基本搜索:
高级搜索
具有附加选项的更高级搜索:
计数匹配
计算某个模式出现的次数:
列出文件
列出将被搜索但不实际搜索的文件:
列出文件类型
列出 ripgrep 中支持的所有文件类型。
安全注意事项
此 MCP 服务器使用 ripgrep 工具执�� shell 命令。虽然已尽力安全地转义参数,但在输入时请务必谨慎,因为它会在您的计算机上运行命令。
执照
麻省理工学院
local-only server
The server can only run on the client's local machine because it depends on local resources.
为 Claude 等 MCP 客户端提供 ripgrep 搜索功能,允许在系统上的文件之间进行高性能文本搜索。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityThe Search MCP Server enables seamless integration of network and local search capabilities in tools like Claude Desktop and Cursor, utilizing the Brave Search API for high-concurrency and asynchronous requests.Last updated -172MIT License
- -securityAlicense-qualityA server implementation that exposes grep functionality through the Model Context Protocol, allowing MCP-compatible clients to search for patterns in files using regular expressions.Last updated -15GPL 3.0
- AsecurityAlicenseAqualityAn MCP server that allows users to efficiently search and reference user-configured documents through document listing, grep searching, semantic searching with OpenAI Embeddings, and full document retrieval.Last updated -43MIT License
- AsecurityAlicenseAqualityMCP server that lets you search your Claude Code conversation history to find past solutions, track file changes, and learn from previous work.Last updated -72253MIT License