MCP Ripgrep Server

by mcollina
Verified

local-only server

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

Integrations

  • 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.

MCP Ripgrep サーバー

Claude などの MCP クライアントに ripgrep (rg) 検索機能を提供する MCP サーバー。

概要

このサーバーは、強力な検索ツールripgrep用のモデルコンテキストプロトコル(MCP)インターフェースを提供します。これにより、Claude AIやその他のMCP対応クライアントは、システム上のファイル全体にわたって高性能なテキスト検索を実行できます。

前提条件

  • Node.js (v18以上)
  • ripgrep ( rg ) コマンドがインストールされ、PATH で利用可能になっていること。macOS ではbrew install ripgrepでインストールできます。

Claude for Desktop での使用

この 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 for Desktop を再起動します。

利用可能なツール

検索

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ツールを使用してシェルコマンドを実行します。引数を安全にエスケープするよう努めていますが、マシン上でコマンドを実行するため、入力にはご注意ください。

ライセンス

マサチューセッツ工科大学

You must be authenticated.

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

Claude などの MCP クライアントに ripgrep 検索機能を提供し、システム上のファイル間での高性能なテキスト検索を可能にします。

  1. Overview
    1. Prerequisites
      1. Usage with Claude for Desktop
        1. Available Tools
          1. search
          2. advanced-search
          3. count-matches
          4. list-files
          5. list-file-types
        2. Security Considerations
          1. License
            ID: hcia0l3ms0