Skip to main content
Glama
repo-explorer-mcp

repo-explorer-mcp

by kwitsch

repo-explorer-mcp

Rust 製の MCP サーバーであり、explore_repository ツールを rmcp stdio トランスポート経由で公開し、Linux(x86_64-unknown-linux-gnu)と Windows(x86_64-pc-windows-msvc)向けに配布されています。内部の LLM 探索ループを、codebase-memory-mcp バックエンドと ripgrep/rtk テキスト検索の上で駆動します。

インストール(推奨:npx セットアップスクリプト)

セットアップスクリプトは、OS/アーキテクチャを検出し、ランタイム依存関係の確認/インストールを行い、一致するリリースアーカイブをダウンロードしてチェックサム検証し、バイナリをインストールして、PATH の状態を報告し、すぐに使える .mcp.json スニペットを出力します。

npx github:kwitsch/repo-explorer-mcp
# After the package is published to npm:
# npx repo-explorer-mcp-setup

フラグ:

  • -y, --yes — 非対話モード。依存関係のインストールを自動承認します。

  • --force — 最新のバイナリがすでに存在する場合でも再インストールします。

  • --version <x.y.z> — 特定のリリースをインストールします(デフォルト:最新)。

  • -h, --help — 使用法を表示します。

スクリプトは、~/.local/bin(Linux)または %LOCALAPPDATA%\repo-explorer-mcp(Windows)にインストールします。シェルプロファイルやシステムの PATH は変更しません。インストールディレクトリが PATH 上にあるかどうかを報告するだけです。ripgrep は、Linux では apt/dnf/pacman、Windows では winget で自動的にインストールされます。これらのいずれも利用できない場合は、スクリプトは警告を表示し、ripgrep 自身のインストールドキュメントを参照するよう案内するだけで、自分自身ではインストールしません。rtk と codebase-memory-mcp は報告のみです。存在しない場合、スクリプトが通知し、それぞれの上流のインストールドキュメントを参照するよう案内します(rtk はオプションで、検索は通常の ripgrep にフォールバックします)。

Related MCP server: mnemo

インストール(手動フォールバック)

ソースからビルドします:

cargo build --release --workspace
# binary at target/release/repo-explorer-mcp

あるいは、リリースアーカイブとそのチェックサムをダウンロードして検証し、バイナリを PATH 上に配置します(検証コマンドは docs/smoke-test.md を参照してください)。リリースアセットは、固定の命名規則に従います:

repo-explorer-mcp-<version>-x86_64-unknown-linux-gnu.tar.gz (+ .sha256)
repo-explorer-mcp-<version>-x86_64-pc-windows-msvc.zip       (+ .sha256)

https://github.com/kwitsch/repo-explorer-mcp/releases から取得します。

バージョンを確認します:

repo-explorer-mcp --version # prints: repo-explorer-mcp 0.1.0

設定

サーバーは TOML 設定を読み取ります。パスの優先順位:--config <path> → REPO_EXPLORER_CONFIG 環境変数 → ./repo-explorer.toml です。起動時の作業ディレクトリが、探索対象のリポジトリのルートとして扱われます。

repo-explorer.toml の例:

[llm]
# Failover cooldown after a provider errors, in seconds.
cooldown_seconds = 90

# Providers are tried in file order (= failover order).
[[llm.providers]]
name = "primary"
kind = "anthropic"
api_key_env = "ANTHROPIC_API_KEY"   # names an env var; never the key itself
model = "claude-sonnet-4"

[[llm.providers]]
name = "secondary"
kind = "openai"
api_key_env = "OPENAI_API_KEY"
model = "gpt-4o"

# Exactly one of `command`+`args` (stdio) XOR `endpoint` (network).
[codebase_memory]
command = "codebase-memory-mcp"
args = ["--stdio"]

[search]
prefer_rtk = false        # true prefers `rtk rg`; false uses plain ripgrep
timeout_seconds = 45
# rtk_path / ripgrep_path may be set explicitly; omitted => auto-detected on PATH.

[logging]
level = "info"            # trace | debug | info | warn | error

各 api_key_env で指定された環境変数が実際に環境に設定されている必要があります。設定されていない場合、設定の読み込みは MissingEnvVar で失敗します。

.mcp.json

インストール済みバイナリ用の形式(セットアップスクリプトが出力するもの):

{
  "mcpServers": {
    "repo-explorer": {
      "command": "/home/you/.local/bin/repo-explorer-mcp",
      "args": [],
      "env": {}
    }
  }
}

Windows では、command は %LOCALAPPDATA%\\repo-explorer-mcp\\repo-explorer-mcp.exe です。repo-explorer.toml が起動時のカレントディレクトリ(cwd)にない場合は、"--config", "<path>" を args に追加してください。リポジトリ内開発用の形式では、代わりに cargo run --release --quiet -p repo-explorer-mcp -- で起動します。

ビルドとテスト

cargo build --workspace
cargo test --workspace
cargo clippy --all-targets -- -D warnings
cargo fmt --check

トラブルシューティング

設定の読み込みは、名前付きエラーで直ちに失敗します。

エラー

原因

修正

EmptyProviderList

llm.providers が空です

少なくとも 1 つの [[llm.providers]] を追加してください。

DuplicateProviderName

2 つのプロバイダーが同じ name を共有しています

各プロバイダーの name を一意にしてください。

MissingEnvVar

api_key_env が未設定の変数を指定しています

起動前に、指定された変数を export してください。

MissingCodebaseMemoryConnection

command と endpoint のどちらも設定されていません

[codebase_memory] の下に、どちらか 1 つだけを設定してください。

ConflictingCodebaseMemoryConnection

command と endpoint の両方が設定されています

どちらか 1 つだけを残してください。

ダウンロードしたリリースアーカイブのエンドツーエンド検証については、docs/smoke-test.md を参照してください。

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Enables read-only querying of a local repository through a deterministic tree-sitter symbol and edge graph, exposing keyword search with exact file:line hits, regex text search, per-file symbol skeletons, caller/callee traversal, and directory-level maps of clusters, hubs, and hotspots over stdio.
    10
    166 npm
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Serves local-first project memory over stdio, exposing tools to inspect project state, search and retrieve context, report memory, and create Git-aware checkpoints for coding agents.
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients such as Claude Desktop and Claude Code to query an indexed source repository through path-guarded tools for hybrid keyword-and-vector code search, file snippets, symbol explanations, reference lookups, and test-skeleton suggestions. Serves those results over stdio with cited file:line locations so agents can answer questions about a codebase and drive grounded code review.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables coding agents to find code by behavior across an authorized repository, returning exact source excerpts with paths and line numbers. It exposes a single semantic search tool over stdio so agents can locate relevant code without knowing file names or symbols.
    234 npm
    1
    MIT