BM25 search + tree navigation over markdown docs for AI agents. No embeddings, no LLM calls.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add doctree --env DOCS_ROOT='<DOCS_ROOT>' -- npx -y doctree-mcp~/.codex/config.toml
[mcp_servers.doctree]
command = "npx"
args = ["-y", "doctree-mcp"]
env = { DOCS_ROOT = "<DOCS_ROOT>" }
# codex mcp add doctree --env DOCS_ROOT='<DOCS_ROOT>' -- npx -y doctree-mcp~/.cursor/mcp.json
{
"mcpServers": {
"doctree": {
"command": "npx",
"args": [
"-y",
"doctree-mcp"
],
"env": {
"DOCS_ROOT": "<DOCS_ROOT>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"doctree": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"doctree-mcp"
],
"env": {
"DOCS_ROOT": "<DOCS_ROOT>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"doctree": {
"command": "npx",
"args": [
"-y",
"doctree-mcp"
],
"env": {
"DOCS_ROOT": "<DOCS_ROOT>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"doctree": {
"command": "npx",
"args": [
"-y",
"doctree-mcp"
],
"env": {
"DOCS_ROOT": "<DOCS_ROOT>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"doctree": {
"command": "npx",
"args": [
"-y",
"doctree-mcp"
],
"env": {
"DOCS_ROOT": "<DOCS_ROOT>"
}
}
}
}需要的环境变量
DOCS_ROOT
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。