Skip to main content
Glama

MCP Ripgrep Server

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 一起使用:

  1. 编辑 Claude for Desktop 配置文件:
    • 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"] } } }
    /path/to/mcp-ripgrep替换为您克隆此存储库的绝对路径。
  3. 重新启动 Claude 桌面版。

可用工具

搜索

使用 ripgrep 进行基本搜索:

Pattern: error Path: ./src

高级搜索

具有附加选项的更高级搜索:

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

计数匹配

计算某个模式出现的次数:

Pattern: TODO Path: ./src CountLines: true

列出文件

列出将被搜索但不实际搜索的文件:

Path: ./src FileType: js

列出文件类型

列出 ripgrep 中支持的所有文件类型。

安全注意事项

此 MCP 服务器使用 ripgrep 工具执行 shell 命令。虽然已尽力安全地转义参数,但在输入时请务必谨慎,因为它会在您的计算机上运行命令。

执照

麻省理工学院

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

为 Claude 等 MCP 客户端提供 ripgrep 搜索功能,允许在系统上的文件之间进行高性能文本搜索。

  1. 概述
    1. 先决条件
      1. 与 Claude 桌面版一起使用
        1. 可用工具
          1. 搜索
          2. 高级搜索
          3. 计数匹配
          4. 列出文件
          5. 列出文件类型
        2. 安全注意事项
          1. 执照

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              The 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 -
              1
              52
              Python
              MIT License
              • Linux
            • -
              security
              A
              license
              -
              quality
              Provides web search functionality via DuckDuckGo for Claude Code and MCP-compatible clients, featuring advanced content exploration, navigation across search results, and detailed webpage analysis.
              Last updated -
              1
              Python
              MIT License
            • A
              security
              A
              license
              A
              quality
              An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
              Last updated -
              1
              93
              Python
              MIT License
              • Apple
              • Linux
            • A
              security
              A
              license
              A
              quality
              Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
              Last updated -
              3
              60
              67
              JavaScript
              MIT License
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcollina/mcp-ripgrep'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server