Labsco
MCP SERVER

Doctree MCP

by joesaby

Search your markdown, then walk it: BM25 finds the section, the tree tools let the agent drill in without loading the whole document.

Framework & SDK Documentation Lookup
Summary
The retrieval trail is replayable, which a similarity score is not.

Search, outline, navigate, read — four calls you can show someone, in a domain where 'the model found it somewhere' is not an acceptable answer. Keeping the working set small is the other half: the agent takes the section it needs rather than a window full of chunks. Note that the skills carry as much of the value as the tools; without them an agent will use search_documents like a search box and stop there.

What it is

Document retrieval over markdown, CSV and JSONL with no vector database, no embeddings and no model calls at index time. Search returns positions in a navigable tree; the agent then reads the outline, opens a node, or takes a section with its descendants.

What you get
  • search_documents — BM25 with facet filters from your frontmatter, expanded through a glossary you supply
  • get_tree for the table of contents: headings, word counts and summaries
  • navigate_tree for a section plus everything under it in one call
  • get_node_content for the full text of one section by node id
  • lookup_row for exact-key retrieval from CSV and JSONL rows
  • find_similar, draft_wiki_entry and write_wiki_entry when writing is switched on — with path containment, schema validation, duplicate guards and a dry run
  • Bundled skills that teach the drill-down policy: search, outline, navigate, retrieve
  • An init command that scaffolds a wiki layout, writes the client config and installs a lint hook
Requirements

DOCS_ROOT pointing at your markdown, and that is the minimum. DOCS_GLOB widens it to CSV and JSONL, DOCS_ROOTS handles several weighted collections, and GLOSSARY_PATH supplies the query-expansion terms. Writing is off unless WIKI_WRITE is set. Runs over stdio by default; there is an HTTP mode for teams and hosted agents.

Setup effort

One command — bunx doctree-mcp init