# Doctree MCP

> Doctree MCP is an open-source MCP server. BM25 search + tree navigation over markdown docs for AI agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/joesaby/doctree-mcp
- **MCP Registry name:** io.github.joesaby/doctree-mcp
- **Listing updated:** 2026-11-13

## About

BM25 search + tree navigation over markdown docs for AI agents. No embeddings, no LLM calls.

## Install

### Claude Code (Terminal)

```sh
claude mcp add doctree-mcp --env DOCS_ROOT='<DOCS_ROOT>' -- npx -y doctree-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "doctree-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "doctree-mcp"
      ],
      "env": {
        "DOCS_ROOT": "<DOCS_ROOT>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "doctree-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "doctree-mcp"
      ],
      "env": {
        "DOCS_ROOT": "<DOCS_ROOT>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "doctree-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "doctree-mcp"
      ],
      "env": {
        "DOCS_ROOT": "<DOCS_ROOT>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "doctree-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "doctree-mcp"
      ],
      "env": {
        "DOCS_ROOT": "<DOCS_ROOT>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "doctree-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "doctree-mcp"
      ],
      "env": {
        "DOCS_ROOT": "<DOCS_ROOT>"
      }
    }
  }
}
```

## FAQ

### Is Doctree MCP free?

Yes. Doctree MCP is open source, so you can use and self-host it for free.

### How do I add Doctree MCP to Claude Code?

Run this command in your terminal: claude mcp add doctree-mcp --env DOCS_ROOT='<DOCS_ROOT>' -- npx -y doctree-mcp

## Where this comes from

- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.

---
Source: https://ai-powered.com/mcp/doctree-mcp
