Get the FREE Ultimate OpenClaw Setup Guide →

mcp -reposearch

MCP server from Astricaelus/mcp-server-reposearch

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio astricaelus-mcp-server-reposearch node server.js \
  --env REPOSEARCH_REGEX="Enable or configure regex search (true/false or specific pattern)" \
  --env REPOSEARCH_IGNORE_FILE="Path to the .reposearchignore file (default: .reposearchignore in project root)"

How to use

This MCP server provides an enhanced content search tool to replace or augment the built-in search_files utility in Cline. It supports filtering via a .reposearchignore file (using a gitignore-like format) and can perform regex-based searches for flexible query patterns. The output can be configured to include the matched content or to provide only match metadata. A key advantage is avoiding token explosion by efficiently streaming results and allowing precise control over what is returned. Note: If you are incorporating this into your system prompts, you may need to tell Cline to stop using the default search_files tool and route searches through this reposearch server instead for better results.

How to install

Prerequisites:

  • Node.js (v14+ recommended)
  • npm or pnpm
  • Access to the repository containing the reposearch MCP server

Steps:

  1. Clone the repository git clone https://github.com/your-org/mcp-reposearch.git cd mcp-reposearch

  2. Install dependencies npm install

    or if you use pnpm

    pnpm install

  3. Prepare configuration (optional) Create a .reposearchignore in the project root to define files/patterns to exclude. Example:

    Ignore node_modules and build outputs

    node_modules/ dist/

  4. Run the server npm run start

    or if package uses a different script, run the specified start command

  5. Integrate with MCP framework Ensure the MCP framework points to the reposearch server via the mcp_config (see the mcp_config section below). You may also set environment variables as needed (see additional_notes).

Additional notes

Hints and tips:

  • The server honors a .reposearchignore file using a gitignore-compatible format to filter results.
  • Regex search is supported to allow complex query patterns; enable it via configuration if needed.
  • Output options include whether to include the content of matches; adjust settings to balance detail with payload size.
  • If you switch from the default search_files tool, ensure the system prompt or orchestration logic routes search queries to this reposearch server.
  • Common issues: ensure the working directory contains .reposearchignore or specify its path via environment variable (REPOSEARCH_IGNORE_FILE). Check logs for invalid regex patterns or syntax errors in the ignore file.
  • If deploying in containers, you may want to mount your project root so that .reposearchignore and any search data files are accessible inside the container.

Related MCP Servers

Sponsor this space

Reach thousands of developers