BM25 search + tree navigation over markdown docs for AI agents. No embeddings, no LLM calls.
Setup
Choose your client, copy the config, then fill in any required environment variables.
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>"
}
}
}
}Environment variables
DOCS_ROOT
Replace the placeholders with your own credentials and keep them out of version control.