Skip to main content
Glama
mcp-filesearch

mcp-filesearch

mcp-filesearch

A read-only, root-scoped filesystem search MCP server. It wraps ripgrep (rg) behind a small set of bounded tools — file listing, match counting, content search — always confined to the roots passed on the command line: never a shell, never a write.

Status: under construction, phase by phase. docs/implementation-plan.md is the canonical plan and records what has landed. Today the server ships get_datetime as its liveness probe; the search tools arrive phase by phase behind the security rules in CONVENTIONS.md.

Requirements

Node ≥ 22; CI runs 22 and 24, and .node-version pins 24 for local mise users. The search tools spawn rg, which CI runners ship.

Related MCP server: MCP Smart Filesystem Server

Develop

npm ci
npm run build
npm test

npm test runs vitest against src/ through the SDK's own client over an in-memory transport, so no build is needed to test. npm run build is needed for the bin entry and for npx over GitHub.

Run

node dist/index.js /path/to/search [another/root ...]

At least one allowed root is required — there is no default and no cwd fallback. Roots are realpathed at startup and duplicates collapse; every path a tool touches is validated against them before anything runs.

Register with 1MCP

"filesearch": {
  "command": "npx",
  "args": ["-y", "github:GwylimWilliams/mcp-filesearch", "/path/to/search"],
  "tags": ["notes", "search"]
}

Scoped roots are passed as CLI args after the repo — never cwd, so the scoping holds whatever directory the gateway happens to run in. The prepare script builds on install, which is what makes npx -y github:… work without a published package.

The rules

License

MIT.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides LLM-optimized filesystem access with intelligent file pagination for large files, lightning-fast ripgrep-powered code search with regex support, and security sandboxing to safely explore and search codebases.
      7
      10 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides ripgrep search capabilities to MCP clients like Claude, enabling high-performance text searches across files on your system.
      5
      15 npm
      MIT