markdown — Claude Code MCP server: search and navigate .md files
Searches local markdown files, extracts sections by heading, builds table of contents, finds code blocks, and parses YAML frontmatter.
MIT ★ 8 updated 2026-10-11
claude mcp add markdown -- npx -y mcp-server-markdownWhat markdown does
The server provides six tools: list_files recursively collects all .md in a folder, search_docs runs full-text search across files (up to 50 results), get_section extracts a section from a heading until the next one at the same or higher level, list_headings builds a table of contents, find_code_blocks finds fenced code blocks with optional language filter, get_frontmatter reads YAML metadata at the start of a file.
It works with internal wikis, ADRs, onboarding guides — anything stored as .md in a repository or on disk. The filesystem MCP server reads the same files as raw text and does not understand document structure.
No API keys required; paths are local, and tools receive directory and file paths directly from the agent.
What it helps with
- search for a term across all project documentation
- extract the API Reference section from a README without reading the whole file
- build a table of contents for architecture decision records
- find all TypeScript examples in a knowledge base
- read YAML metadata from an article
Example prompts for the agent
- Search all files in
./docsfor mentions of authentication - Show me the Installation section from
CONTRIBUTING.md - List all headings in
architecture/decisions/
How to install markdown
Platform CLI
claude mcp add markdown -- npx -y mcp-server-markdownPlatform CLI
codex mcp add markdown -- npx -y mcp-server-markdownConfig file
{
"mcpServers": {
"markdown": {
"command": "npx",
"args": [
"-y",
"mcp-server-markdown"
]
}
}
}Config file
{
"servers": {
"markdown": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-server-markdown"
]
}
}
}Platform CLI
gemini mcp add markdown npx -y mcp-server-markdownStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about markdown
How do I install markdown in Claude Code?
Run claude mcp add markdown -- npx -y mcp-server-markdown.
What does the markdown MCP server do?
It searches local .md files, extracts sections by heading, builds a table of contents, finds code blocks, and reads YAML frontmatter.
How is markdown different from the filesystem MCP server?
The filesystem server reads .md as raw text. markdown understands headings, sections, fenced code blocks, and metadata.