mcp-server-markdown
MCP server for markdown files — search, extract sections, list headings, find code blocks across docs.
README
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
.mdfiles, no auth needed.

<sub>Demo built with <a href="https://github.com/ofershap/remotion-readme-kit">remotion-readme-kit</a></sub>
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
<sub>README built with README Builder</sub>
License
MIT © 2026 Ofer Shapira
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.