MCP Ripgrep 服务器

MCP Ripgrep 服务器

一个为 ripgrep 提供 MCP 接口的服务器,支持高性能文本搜索。

快速入门

前置条件

  • 安装 Node.js (v18 或更高)
  • 确保 ripgrep (rg) 已安装并加入 PATH(macOS 使用 brew install ripgrep

配置 Claude for Desktop

  1. 打开配置文件:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. 添加以下内容: { "mcpServers": { "ripgrep": { "command": "npx", "args": ["-y", "mcp-ripgrep@latest"] } } }
  3. 重启应用。

可用工具

  • search: 基本搜索
  • advanced-search: 高级搜索选项
  • count-matches: 统计匹配数量
  • list-files: 列出搜索范围内的文件
  • list-file-types: 列出支持的文件类型