repo-explorer-mcp
repo-explorer-mcp
一个 Rust MCP 服务器,通过 rmcp stdio 传输暴露 explore_repository 工具,为 Linux(x86_64-unknown-linux-gnu)和 Windows(x86_64-pc-windows-msvc)发布。它驱动一个内部 LLM 探索循环,基于 codebase-memory-mcp 后端和 ripgrep/rtk 文本搜索。
安装(推荐:npx 设置脚本)
设置脚本会检测你的操作系统/架构,检查/安装运行时依赖,下载并校验匹配的发布归档,安装二进制文件,报告 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)。它从不修改你的 shell 配置文件或系统 PATH——只报告安装目录是否在 PATH 中。ripgrep 在 Linux 上通过 apt/dnf/pacman 自动安装,在 Windows 上通过 winget 安装;如果这些都不可用,脚本会发出警告并指向 ripgrep 自己的安装文档,而不是自行安装。rtk 和 codebase-memory-mcp 仅报告:如果缺失,脚本会告知你并指向其上游安装文档(rtk 是可选的;搜索会回退到纯 ripgrep)。
Related MCP server: ast-outline-mcp
安装(手动备用)
从源码构建:
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故障排除
配置加载快速失败并带有命名错误:
错误 | 原因 | 修复 |
|
| 至少添加一个 |
| 两个提供者共享一个 | 使每个提供者的 |
|
| 启动前 |
| 既未设置 | 在 |
| 同时设置了 | 只保留一个。 |
参见 docs/smoke-test.md 以端到端验证下载的发布工件。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to explore, search, and read codebase repositories and API specifications efficiently, with support for file searching, content search via ripgrep, and reading API specs.23ISC
- AlicenseAqualityAmaintenanceEnables AI coding agents to efficiently explore codebases by providing structural outlines, module digests, symbol bodies, and AST-aware grep via MCP.433MIT
- AlicenseNot gradedqualityAmaintenanceServes a live code-graph workbench over stdio for MCP clients/agents, enabling Cypher queries and codebase analysis via KGLite tools.MIT
- AlicenseNot gradedqualityAmaintenanceEnables local file search, packing into LLM-ready context, and inspection via an MCP server on stdio.1MIT
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kwitsch/repo-explorer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server