Markdown Server MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add markdown-server -- npx -y mcp-server-markdown
README.md

Search, navigate, and extract content from local markdown files.

mcp-server-markdown

Search, navigate, and extract content from local markdown files. Full-text search, section extraction, heading navigation, code block discovery, and frontmatter parsing.

npx mcp-server-markdown

Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP client. Reads local .md files, no auth needed.

MCP server for searching and navigating markdown documentation

Demo built with remotion-readme-kit

Why

Tools like Context7 are great for looking up library docs from npm, but they don't help with your own documentation. Project wikis, internal knowledge bases, architecture decision records, onboarding guides: they all live as markdown files in your repo or on disk. The filesystem MCP server can read those files, but it treats them as raw text. It doesn't understand headings, sections, or code blocks. This server does. Point it at a directory and your assistant can search across all your docs, pull out a specific section by heading, list the table of contents, or find every TypeScript code example in your knowledge base.

Tools

Tool What it does
list_files List all .md files in a directory recursively (sorted alphabetically)
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 (e.g. typescript)
get_frontmatter Parse YAML frontmatter metadata at the start of a file

Quick Start

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "markdown": {
      "command": "npx",
      "args": ["-y", "mcp-server-markdown"]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "markdown": {
      "command": "npx",
      "args": ["-y", "mcp-server-markdown"]
    }
  }
}

VS Code

Add to user settings or .vscode/mcp.json:

{
  "mcp": {
    "servers": {
      "markdown": {
        "command": "npx",
        "args": ["-y", "mcp-server-markdown"]
      }
    }
  }
}

Examples

  • "Search all docs in ./docs for mentions of 'authentication'"
  • "Show me the 'API Reference' section from README.md"
  • "List all headings in CONTRIBUTING.md"
  • "Find all TypeScript code blocks in the docs"
  • "What's the frontmatter metadata in this file?"
  • "Give me the table of contents for our architecture docs"

Development

git clone https://github.com/ofershap/mcp-server-markdown.git
cd mcp-server-markdown
npm install
npm test
npm run build

See also

More MCP servers and developer tools on my portfolio.

Author


README built with README Builder

License

MIT © 2026 Ofer Shapira

Tools (6)

list_filesList all .md files in a directory recursively (sorted alphabetically)
search_docsFull-text search across all .md files (case-insensitive, up to 50 results)
get_sectionExtract a section by heading until the next heading of same/higher level
list_headingsList all headings as a table of contents
find_code_blocksFind fenced code blocks, optionally filter by language
get_frontmatterParse YAML frontmatter metadata at the start of a file

Configuration

claude_desktop_config.json
{"mcpServers": {"markdown": {"command": "npx", "args": ["-y", "mcp-server-markdown"]}}}

Try it

Search all docs in ./docs for mentions of 'authentication'
Show me the 'API Reference' section from README.md
List all headings in CONTRIBUTING.md
Find all TypeScript code blocks in the docs
What's the frontmatter metadata in this file?

Frequently Asked Questions

What are the key features of Markdown Server?

Full-text search across local markdown files. Section extraction based on heading hierarchy. Table of contents generation via heading listing. Code block discovery with language filtering. YAML frontmatter parsing.

What can I use Markdown Server for?

Searching through internal project wikis and documentation. Extracting specific API reference sections from large markdown files. Finding all code examples in a repository's documentation. Parsing metadata from markdown files for automated workflows.

How do I install Markdown Server?

Install Markdown Server by running: npx mcp-server-markdown

What MCP clients work with Markdown Server?

Markdown Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Markdown Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare