A local MCP server for cross-searching and analyzing multiple local repositories.
It uses ripgrep (rg) as the search engine and can be invoked as a tool from MCP clients such as Claude Code.
- Node.js >= 24
- ripgrep — must be installed as a system binary (
rgon your PATH). Claude Code's built-inrgalias is not available to MCP server subprocesses. - just (task runner)
# macOS
brew install ripgrep justgit clone https://github.com/tamaco489/multi-repository-analyzer.git
cd multi-repository-analyzer
npm install
npm run buildCopy the example files and edit them to match your environment.
just setupEdit .env to set the actual paths of the target repositories.
REPO_A=/Users/yourname/src/repo-a
REPO_B=/Users/yourname/src/repo-b
REPO_C=/Users/yourname/src/repo-cEdit repos.yaml to match your setup. Define env_key (the key name in .env), labels, description, and priority_paths for each repository.
repositories:
repo-a:
env_key: REPO_A
labels: [backend]
description: "Backend API server"
priority_paths:
- src/
repo-b:
env_key: REPO_B
labels: [frontend]
description: "Frontend application"
priority_paths:
- src/
- components/
search:
max_results: 50
context_lines: 3
exclude_patterns:
- node_modules
- .git
- vendor
- dist
- build
- "*.min.js"Run the following command in the project directory where you want to use the tools:
claude mcp add multi-repo-analyzer node /path/to/multi-repository-analyzer/build/index.jsReplace /path/to/multi-repository-analyzer with the actual path where you cloned the repository.
After registration, restart Claude Code and call the list_repos tool. If it returns the repository list, the server is working correctly.
| Tool | Description |
|---|---|
list_repos |
List configured repositories |
search_code |
Cross-search multiple repositories with regex patterns |
find_api_callers |
Find API endpoint call sites across repositories |
find_cross_repo_dependencies |
Track dependencies between repositories |