1. Conduid
  2. Developer Tools
  3. Dirgrep
MCP server · Developer Tools

Dirgrep

CLI tool and MCP server to grep an entire directory in one go

Unclaimed MIT last commit 8 months ago grepmcpclidevtoolsconcurrencysearch
53Fair

Scored 21 hours ago · breakdown

About Dirgrep

Dirgrep is an MCP server published by AstraBert in the Developer Tools category: cLI tool and MCP server to grep an entire directory in one go. It has been installed 0 times through Conduid.

The repository has 5 stars and 2 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx dirgrep

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Dirgrep

Powered by Claude · Grounded in docs

I know everything about Dirgrep. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.2.2v0.2.2 · 28 Dec 2025Changelog ff4d6553abd289f0b84edff6771205f13141842b Merge pull request #7 from AstraBert/feat/no-pretty-and-benchmarks 48487ef71619e8319521555c19b3ae940b333d67 feat: add no-pretty and benchmarks
v0.2.1v0.2.1 · 21 Dec 2025Changelog a5b05c542b6b2bcdb7ee851d35bb23309f4cda42 Merge pull request #6 from AstraBert/chore/vbump c8559df901b83d6a290b45578abfcf807310a77e chore: vbump f1c75539253353432cf984882c5bce8da2a978fd Merge pull request #5 from…
v0.2.0v0.2.0 · 20 Dec 2025Changelog 8b605858b6da080432c519ef77913e893df634f1 Merge pull request #3 from AstraBert/feat/mcp d76ea80eeccc1d5ec90dd9de59820d71516fc33c feat: add an mcp server
v0.1.0v0.1.0 · 20 Dec 2025Changelog 1eee3d5e91e6a1f0e6f6bff45e554b0fdc20202e Merge pull request #2 from AstraBert/docs/docs-and-more 78f54fbfc3f6544503adf0b19a2c9786ab8dd194 docs: add readme, contributing, license and pre-commit…

README

dirgrep

dirgrep is a CLI tool to perform grep operations directory-wise.

Written in Go, it leverages the language built-in concurrency feature to execute grep operations concurrently on all files within a directory (even recursively!).

Install

In order to install dirgrep there are three ways:

  1. Using go: if you already have go 1.23+ installed in your environment, installing dirgrep is effortless
go install github.com/AstraBert/dirgrep
  1. Using npm:
npm install @cle-does-things/dirgrep
  1. Downloading the executable from the releases page: you can download it directly from the GitHub repository or, if you do not want to leave your terminal, you can use curl:
curl -L -o dirgrep https://github.com/AstraBert/dirgrep/releases/download/<version>/dirgrep_<version>_<OS>_<processor>.tar.gz ## e.g. https://github.com/AstraBert/dirgrep/releases/download/0.1.1/dirgrep_0.1.1_darwin_amd64.tar.gz

# make sure the downloaded binary is executable (not needed for Windows)
chmod +x dirgrep

In this last case, be careful to specify your OS (supported: linux, windows, macos) and your processor type (supported: amd, arm).

Usage

dirgrep [command] [flags]

Commands

  • mcp: Start an MCP server over stdio transport

Flags

  • -c, --context int
    Number of characters of context to include around matches. Defaults to 0.

  • -d, --directory string
    Directory to search for the pattern. Defaults to the current working directory (".").

  • -h, --help
    Show the help message and exit.

  • -p, --pattern string
    Pattern to search for within the given directory. Required.

  • -r, --recursive
    Search files recursively. Defaults to false.

  • -s, --skip strings
    One or more sub-directories to skip. Can be specified multiple times or as comma-separated values. Defaults to an empty list.

  • -x, --no-pretty Deactivate pretty-printing for the matches to the console.

Examples

# search for 'package main' in the current directory, excluding .git and .gitub
dirgrep --pattern 'package main' --skip .git --skip .github --recursive
# search in a specific directory non-recursively
dirgrep --pattern 'root' --directory cmd/
# add a context of 200 charachters around the match
dirgrep --pattern '202\d' --context 200
# deactivate pretty-printing
dirgrep --pattern '202\d' --context 100 --no-pretty
# start MCP server
dirgrep mcp

Benchmark

Python 3.9+ is required for running the benchmark

You can run the benchmark for dirgrep (VS other tools) using:

cd benchmark
bash run.sh

This will:

  • Create 1 million files (approx. 4GB) under the benchmark/files directory, containing three random lines each.
  • Start ./dirgrep search for the pattern A password forgot itself at dawn. (one of the random lines), redirecting the standard output to benchmark_dirgrep.txt
  • Start grep search recursively for the same pattern, redirecting the standard output to benchmark_grep.txt
  • Start ripgrep search recursively for the same pattern, redirecting the standard output to benchmark_ripgrep.txt
  • Once the program is finished, you will have the time output for it.

In the latest run, dirgrep VS other tools performed as follows:

Metric dirgrep grep ripgrep Description
user 35.58s 1.53s 2.06s CPU time in user mode (program code)
system 454.60s 27.67s 38.44s CPU time in system mode (kernel ops)
cpu 1166% 17% 312% CPU utilization across all cores
total 42.037s 166.34s 12.940s Actual elapsed wall-clock time

Contributing

We welcome contributions! Please read our Contributing Guide to get started.

License

This project is licensed under the MIT License

README mirrored from the source repository 21 hours ago. The original is authoritative.

Questions

About Dirgrep

How do I install Dirgrep?

Run npx dirgrep, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Dirgrep safe to use with an AI agent?

Its trust score is 53 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Dirgrep still maintained?

The last commit was 8 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.