MCP Ripgrep Server
MCP Ripgrep 服务器
为任何 MCP 客户端(例如 Claude)提供 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 桌面版一起使用
要将此 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 桌面版。
可用工具
搜索
使用 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 命令。虽然已尽力安全地转义参数,但在输入时请务必谨慎,因为它会在您的计算机上运行命令。
执照
麻省理工学院
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