Markdown Search via MCP
Use this skill when you need to search documentation, extract sections, list headings, or find code blocks across local markdown files.
Available Tools
| Tool | What it does |
|---|---|
list_files |
List all .md files in a directory recursively |
search_docs |
Full-text search across all .md files (case-insensitive, up to 50 results) |
get_section |
Extract a section by heading until the next heading of same/higher level |
list_headings |
List all headings as a table of contents |
find_code_blocks |
Find fenced code blocks, optionally filter by language |
get_frontmatter |
Parse YAML frontmatter metadata from a file |
Workflow
list_filesto discover documentation files in the projectsearch_docsfor full-text search across all docslist_headingsto get the table of contents for a specific fileget_sectionto extract a specific section by its heading textfind_code_blocksto find code examples, optionally filtered by language
Key Patterns
get_sectionextracts everything under a heading until the next heading of same or higher levelfind_code_blockswithlanguage: "typescript"filters to only TS examplessearch_docsis case-insensitive and returns up to 50 matches with surrounding context- Unlike the filesystem MCP, this server understands markdown structure (headings, sections, code fences)
Error Scenarios
- No matches from
search_docs: widen the query, check the directory path, or confirm files use.mdextension get_sectionnot found: heading text must match (including#level); uselist_headingsfirst- Permission or missing path errors: verify the directory exists and is readable on the host running the MCP server
- More than 50 search hits: refine the query or search a smaller subdirectory