markdown_treeLABSCO SUMMARY
Structure first, then the section — not the whole file.
The pattern it enables is three cheap calls instead of one expensive read: see the tree, find the section's bounds, read that section. On a 2,000-line planning document that is the difference between a task being answerable and the context being spent before the work starts.
What it is
A Go MCP server that navigates large markdown files by structure, using Universal Ctags to index headings and reading only the sections you ask for.
What you get
- Document structure shown as a tree, in ASCII or JSON, with the heading depth capped where you want it and defaulting to H1 plus H2
- Sections listed with a maximum heading level and an optional regex filter on the name
- Line-number boundaries for a named section, for when you need the range rather than the text
- The content of one section read by its exact heading, with subsection depth limited or taken in full
- Ctags run automatically on demand, with results cached and the cache invalidated when the file changes
- Token use on large documentation, planning files and specifications cut down by reading sections instead of whole files
Requirements
Universal Ctags installed (brew install universal-ctags, or the apt or dnf equivalent) and a recent Go to build the binary. No account and no key.
Setup effort
Follow the published steps — brew install universal-ctags
USE CASES
Working on one task inside a huge planning document
View the tree, locate the task's section, and read only that section rather than the whole file.
Getting oriented in unfamiliar documentation
Read the structure as a tree at H1 and H2 depth before reading any content at all.
Finding every section that matches a pattern
Filter the section list by regex when you know the naming convention but not the exact heading.
Editing a section by line range
Get the section's start and end line numbers so an edit targets exactly it.
Reading a section without its sub-sections
Cap the subsection depth so a heavily nested section returns its own content rather than everything beneath it.
4 tools
Listed in project docs. Your client may show a different list.
markdown_section_boundsmarkdown_read_sectionmarkdown_list_sectionsBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
- Universal Ctags
- Go 1.21 or later
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
Install Universal Ctags — on macOS:
brew install universal-ctagsOn Ubuntu/Debian:
sudo apt install universal-ctagsOn Fedora:
sudo dnf install universal-ctags
git clone https://github.com/yoseforb/markdown-navigator-mcp.git
cd markdown-navigator-mcp
go build -o mdnav-server ./cmd/server
sudo cp mdnav-server /usr/local/bin/MCP Clients
Claude Code
{
"mcpServers": {
"markdown-nav": {
"command": "mdnav-server"
}
}
}