MCP Ripgrep Server
MCP Ripgrep サーバー
Claude などの MCP クライアントに ripgrep (rg) 検索機能を提供する MCP サーバー。
概要
このサーバーは、強力な検索ツールripgrep用のモデルコンテキストプロトコル(MCP)インターフェースを提供します。これにより、Claude AIやその他のMCP対応クライアントは、システム上のファイル全体にわたって高性能なテキスト検索を実行できます。
Related MCP server: MCP Desktop Tools
前提条件
Node.js (v18以上)
ripgrep (
rg) コマンドがインストールされ、PATH で利用可能になっていること。macOS ではbrew install ripgrepでインストールできます。
Claude for Desktop での使用
この MCP サーバーを Claude for Desktop で使用するには:
Claude for Desktop 構成ファイルを編集します。
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
設定に以下を追加します。
{ "mcpServers": { "ripgrep": { "command": "npx", "args": ["-y", "mcp-ripgrep@latest"] } } }/path/to/mcp-ripgrepこのリポジトリのクローンを作成した場所への絶対パスに置き換えます。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ツールを使用してシェルコマンドを実行します。引数を安全にエスケープするよう努めていますが、マシン上でコマンドを実行するため、入力にはご注意ください。
ライセンス
マサチューセッツ工科大学
Available Tools
5 toolsadvanced-searchC
Advanced search with ripgrep with more options
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | The search pattern (regex by default) | |
| path | Yes | Directory or file(s) to search. | |
| caseSensitive | No | Use case sensitive search (default: auto) | |
| fixedStrings | No | Treat pattern as a literal string, not a regex | |
| filePattern | No | Filter by file type or glob | |
| fileType | No | Filter by file type (e.g., js, py) | |
| maxResults | No | Limit the number of matching lines | |
| context | No | Show N lines before and after each match | |
| invertMatch | No | Show lines that don't match the pattern | |
| wordMatch | No | Only show matches surrounded by word boundaries | |
| includeHidden | No | Search in hidden files and directories | |
| followSymlinks | No | Follow symbolic links | |
| showFilenamesOnly | No | Only show filenames of matches, not content | |
| showLineNumbers | No | Show line numbers | |
| useColors | No | Use colors in output (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It only mentions 'more options' without explaining what ripgrep is, how results are returned (e.g., format, pagination), performance implications, or error handling. For a complex 15-parameter tool, this leaves critical behavioral traits undocumented.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the core purpose. However, it could be more front-loaded by specifying key differentiators upfront (e.g., 'regex-based file search with extensive filtering options') to immediately clarify value beyond the sibling tools.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 15 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the search engine (ripgrep), result format, error cases, or performance considerations, leaving significant gaps for an AI agent to use it correctly without trial and error.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 15 parameters. The description adds no additional parameter semantics beyond implying 'more options' exist, which the schema already details. Baseline 3 is appropriate when the schema does all the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool performs 'Advanced search with ripgrep with more options', which identifies the action (search) and technology (ripgrep). However, it's vague about what 'more options' entails and doesn't clearly distinguish this from the sibling 'search' tool, leaving ambiguity about when to choose one over the other.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like the sibling 'search' tool. It mentions 'more options' but doesn't specify what scenarios require these advanced features, leaving the agent without clear usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
count-matchesC
Count matches in files using ripgrep
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | The search pattern (regex by default) | |
| path | Yes | Directory or file(s) to search. | |
| caseSensitive | No | Use case sensitive search (default: auto) | |
| filePattern | No | Filter by file type or glob | |
| countLines | No | Count matching lines instead of total matches | |
| useColors | No | Use colors in output (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'using ripgrep' which implies a command-line search tool behavior, but doesn't describe output format, error handling, performance characteristics, or whether this is a read-only operation. For a tool with 6 parameters and no annotations, this is inadequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - just 6 words that directly state the tool's purpose. Every word earns its place with zero waste. It's appropriately sized for a simple search/count tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the output looks like (just counts? formatted results?), doesn't mention error conditions, and provides no context about the ripgrep implementation details that might affect usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional parameter information beyond what's in the schema. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('count matches') and the tool used ('using ripgrep'), which is a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'search' tool, which likely performs similar search functionality but with different output. The purpose is clear but lacks sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like the 'search' or 'advanced-search' sibling tools. There's no mention of prerequisites, typical use cases, or exclusions. The agent must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-filesB
List files that would be searched by ripgrep without actually searching them
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Directory or file(s) to search. | |
| filePattern | No | Filter by file type or glob | |
| fileType | No | Filter by file type (e.g., js, py) | |
| includeHidden | No | Include hidden files and directories |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the tool lists files 'without actually searching them,' which hints at a read-only, non-destructive behavior, but doesn't disclose other traits like performance characteristics, rate limits, or authentication needs. For a tool with zero annotation coverage, this is a significant gap in behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. It avoids unnecessary words and directly communicates the tool's function, making it easy to parse and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on output format, error handling, or integration with sibling tools. Without annotations or an output schema, more context would improve completeness for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters (path, filePattern, fileType, includeHidden) with descriptions. The description doesn't add any parameter-specific semantics beyond what the schema provides, such as examples or constraints, meeting the baseline score of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List files that would be searched by ripgrep without actually searching them.' It specifies the verb ('List files') and resource ('files that would be searched by ripgrep'), but doesn't explicitly differentiate from sibling tools like 'list-file-types' or 'search' beyond the ripgrep reference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by mentioning 'without actually searching them,' suggesting this is for previewing what ripgrep would search. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'search' or 'list-file-types,' leaving the agent to infer based on the ripgrep reference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-file-typesB
List all supported file types in ripgrep
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation by using 'List', but doesn't specify details like output format, pagination, or performance characteristics. It adds minimal context beyond the basic purpose, meeting a baseline level.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded and efficiently communicates the essential information, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the basic purpose but lacks details on output format or behavioral traits, which could be helpful for an agent. It meets the minimum viable standard for this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately avoids discussing parameters, earning a high score as it doesn't add unnecessary information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'all supported file types in ripgrep', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'list-files' or 'advanced-search', which might also involve listing operations, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'list-files' or 'search'. There's no mention of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchC
Search files for patterns using ripgrep (rg)
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | The search pattern (regex by default) | |
| path | Yes | Directory or file(s) to search. | |
| caseSensitive | No | Use case sensitive search (default: auto) | |
| filePattern | No | Filter by file type or glob | |
| maxResults | No | Limit the number of matching lines | |
| context | No | Show N lines before and after each match | |
| useColors | No | Use colors in output (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure but only states what the tool does at a high level. It doesn't describe output format, performance characteristics, error conditions, or any behavioral traits like whether it's read-only, has rate limits, or requires specific permissions. The mention of 'ripgrep (rg)' hints at implementation but doesn't translate to actionable behavioral information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just one sentence with zero wasted words. It's front-loaded with the core functionality and efficiently communicates the essential purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter search tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the output looks like (lines of text? structured results?), how results are formatted, or any behavioral constraints. The high parameter count and lack of structured output information create significant gaps in understanding how to effectively use this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, all 7 parameters are well-documented in the input schema. The description adds no additional parameter semantics beyond what's already in the structured schema fields, so it meets the baseline expectation but provides no extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('search files for patterns') and the tool used ('using ripgrep (rg)'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate this basic search from sibling tools like 'advanced-search' or 'count-matches', which would require more specific scope definition.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'advanced-search' or 'count-matches'. There's no mention of use cases, prerequisites, or limitations that would help an agent choose between these similar search-related tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
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.221MIT
- 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.526MIT
- 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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