@atef_andrus/mcp-ripgrep
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@atef_andrus/mcp-ripgrepsearch for 'async' in all TypeScript files"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@atef_andrus/mcp-ripgrep
An MCP server that provides ripgrep search capabilities.
Prerequisites
ripgrep (
rg) installed and available on PATHNode.js 22+ or Bun 1.3+
Related MCP server: sourcegraph-mcp
Installation
npm install @atef_andrus/mcp-ripgrepUsage
Use as an MCP Server
Add the following to your MCP client configuration:
{
"mcpServers": {
"ripgrep": {
"command": "npx",
"args": ["@atef_andrus/mcp-ripgrep"]
}
}
}Startup Options
Option | Description |
| Restrict search scope to the specified directory (can be specified multiple times) |
| Maximum characters in results. Truncates at line boundaries when exceeded (default: 50,000) |
| Maximum bytes of ripgrep output. Terminates the process and truncates results when exceeded (default: 20 MB) |
Configuration example with startup options:
{
"mcpServers": {
"ripgrep": {
"command": "npx",
"args": [
"@atef_andrus/mcp-ripgrep",
"--allow-dir", "/home/user/project",
"--max-result-chars", "50000",
"--max-output-bytes", "20000000"
]
}
}
}Tools
Tool | Description |
| Pattern search with regex, literal strings, multiline matching, OR matching, context lines, and various filters. Prepends a summary of match count and file count to results |
| Search-and-replace preview (read-only). Supports multiline matching and capture groups ($1, ${name}) |
| Count matches per file (by line count or total matches). Supports sorting results |
| List files that match or do not match a pattern |
| List all files within the search scope |
| List file types supported by ripgrep |
Key Parameters
Parameter | Description |
| Search pattern (regex by default) |
| Directory or file to search |
| Treat the pattern as a literal string |
|
|
| Filter by file type (e.g., |
| Exclude file types (e.g., |
| Filter by glob pattern (e.g., |
| Include hidden files |
| Follow symbolic links |
| Maximum directory traversal depth |
| Ignore .gitignore rules and search files that are normally excluded |
| Enable multiline matching (function signatures, import blocks, etc.) |
| Additional patterns for OR matching (array) |
| Sort results. search / search-files / list-files: |
| Maximum characters in results. Truncates at line boundaries and appends a summary when exceeded |
Parameter Support by Tool
Parameter |
|
|
|
|
|
|
| - | - | o | o | o | o |
| - | o | o | o | o | o |
| - | - | o | o | o | o |
| - | - | o | o | o | o |
| - | - | o | o | o | o |
| - | - | o | o | - | - |
| - | o | o | o | o | o |
| - | o | o | o | o | o |
| - | o | o | o | o | o |
| - | - | o | o | - | - |
| - | - | o | - | - | - |
| - | - | o | - | - | - |
| - | - | o | - | - | - |
| - | - | o | - | - | o |
| - | o | o | o | o | o |
| - | o | o | o | o | o |
| - | o | o | o | o | o |
| - | - | o | - | - | - |
| - | - | o | - | - | - |
| - | - | o | - | - | - |
| - | o | o | o | o | o |
| - | o | o | - | o | o |
| o | o | o | o | o | o |
| - | - | - | o | - | - |
| - | - | - | o | - | - |
| - | - | - | - | o | - |
| - | - | - | - | o | - |
Development
# Install dependencies
bun install
# Run tests
bun test
# Type check
bunx tsc --noEmit
# Lint and format
bunx biome check --write .
# Build
bunx tsc
# Start in development mode
bun run devSecurity
This server passes arguments as an array via
spawn("rg", args)(no shell interpolation). Patterns and paths are placed after a--separator to prevent flag injection.The
--allow-diroption restricts the search scope to specified directories. Paths are resolved to absolute paths usingpath.resolve()and validated via prefix matching.Limitation: When
followSymlinksis enabled, symbolic links may allow access to directories outside the allowed scope. Be aware of this when using--allow-dirtogether withfollowSymlinks.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/AtefAndrus/mcp-ripgrep'
If you have feedback or need assistance with the MCP directory API, please join our Discord server