advanced-search
Advanced search with ripgrep with more options
Search a codebase with ripgrep from the session — with context lines, type filters, literal-string mode and inverted matches — or just count the hits instead of drowning in them.
LABSCO SUMMARY
count-matches answers "how common is this" without returning a single hit, list-files answers "what would this even search" before you pay for the scan, and maxResults bounds whatever is left. advanced-search carries the flags that usually decide the outcome — fixedStrings when the pattern is literal text that looks like a regex, invertMatch when the interesting files are the ones without the match, includeHidden when the answer is in something ripgrep skips by default.
A ripgrep wrapper in five tools: a plain pattern search, an advanced search that exposes ripgrep's flags as parameters, a count-only mode, a dry run that lists the files a search would cover, and ripgrep's own type list.
Ripgrep (rg) available on the machine, and Node on your PATH.
One command — npx -y mcp-ripgrep@latest
USE CASES
Search with context lines to see how each hit is used, and count first when the pattern might be everywhere — a count tells you whether the rename is a ten-minute job or a week.
fixedStrings turns off pattern interpretation, so a version constraint or a path with dots matches as written rather than as a wildcard.
invertMatch returns the lines that do not match, which is how you find the config files without a license header or the modules that never import the thing they should.
List the files a search would touch before running it, and read back the file types ripgrep recognises so the fileType filter is passed a name it knows rather than a guess.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
advanced-searchAdvanced search with ripgrep with more options
count-matchesCount matches in files using ripgrep
list-file-typesList all supported file types in ripgrep
list-filesList files that would be searched by ripgrep without actually searching them
searchSearch files for patterns using ripgrep (rg)
BEFORE YOU INSTALL
5 tools when we connected.
CONTEXT COST
Rated by the size of the 5 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"mcp-ripgrep": {
"command": "npx",
"args": [
"-y",
"mcp-ripgrep@latest"
]
}
}
}npx -y mcp-ripgrep@latest