md-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@md-mcpsearch my notes for docker compose"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
md-mcp
Transform from Prompt Engineering to Context Engineering.
A lightweight Python library that instantly exposes your local markdown documentation, notes, and knowledge bases to any AI tool that supports the Model Context Protocol (MCP) โ including Claude Desktop.
No embeddings, no preprocessing, and no uploading. Your files stay safely on your local machine, and any real-time updates are instantly reflected in your AI's context.


๐ Quick Start
1. Install
Option A: Install from pypi
pip install md-mcpOption B: Install from source code
uv sync2. Launch the Web UI (Recommended)
The easiest way to manage your markdown servers is through the visual dashboard:
md-mcp --webIf the command is not recognized (e.g., if the Python scripts directory is not in your system PATH), you can run:
uv run python -m md_mcp --webJust point at a folder and go!
3. Or use the CLI
If you prefer the command line:
# Expose a folder of markdown files
md-mcp --folder ~/Documents/notes --name "My Notes"
# That's it! Restart Claude Desktop and it's available.Related MCP server: MCP Documentation Service
๐ Features
Context Engineering: Feed your AI assistant exactly the right local context to get better answers, eliminating the need to endlessly prompt.
Universal MCP Support: Works natively with Claude Desktop and any other AI tool or agent that supports the Model Context Protocol.
Local & Secure First: Your files never leave your machine. No cloud uploads, no third-party APIs parsing your sensitive notes.
Real-time Sync: Edit your markdown files and the MCP server picks up the changes instantly. No need to regenerate embeddings or re-index.
Auto File Watching: Automatically detects when files are added, modified, or deleted (powered by watchdog). Use the
rescan_folder()tool in Claude Desktop for manual refresh if needed.Zero Configuration: Just point at a folder and go.
Auto-Discovery: Recursively finds all
.mdfiles.Metadata Extraction: Parses YAML frontmatter and first paragraphs for rich resource descriptions.
Search Support: Built-in search across all files to quickly find the needle in the haystack.
Web Interface: Easy-to-use visual dashboard for non-technical users to manage multiple knowledge bases.
Observable by Default: Optional OpenTelemetry instrumentation (
uv pip install "md-mcp[observability]") traces every MCP tool call โ an audit trail of what your AI assistant actually did with your notes. See docker/README.md.
๐ฏ Use Cases
1. Personal Knowledge Base
md-mcp --folder ~/obsidian-vault --name "Obsidian"โ Claude can now read your entire Obsidian vault
2. Project Documentation
md-mcp --folder ~/code/myproject/docs --name "Project Docs"โ Claude has full context on your project
3. Research Papers
md-mcp --folder ~/research/papers-md --name "Research"โ Claude can reference your research notes
๐ Advanced Usage commands
Web Interface (easiest way to use)
# Direct command (if in PATH)
md-mcp --web
# Or via Python module
uv run python -m md_mcp --web
# You can optionally specify a custom port (default is 5000)
md-mcp --web --port 8080
# or: uv run python -m md_mcp --web --port 8080Add a Markdown Folder
# With explicit name
md-mcp --folder /path/to/docs --name "My Docs"
# Auto-name from folder
md-mcp --folder ~/notes
# Creates server named "notes"
# Alias: --add
md-mcp --add ~/work-docs --name "Work"Scan Before Adding (Dry Run)
md-mcp --folder ~/notes --scan
# Shows what files would be exposedList Configured Servers
md-mcp --list
# Shows all md-mcp serversShow Configuration Status
md-mcp --status
# Shows Claude config path and all serversRemove a Server
md-mcp --remove "My Docs"Interactive Mode
md-mcp
# Prompts for folder path๐ง How It Works
You run the CLI:
md-mcp --folder ~/notes --name "Notes"md-mcp:
Scans folder for
.mdfilesExtracts metadata (frontmatter, descriptions)
Updates Claude Desktop config
Registers MCP server entry
In Claude Desktop:
Restart Claude
Server appears in MCP dropdown
All markdown files available as resources
Use search tools to find content
๐ What Gets Exposed
Each markdown file becomes an MCP Resource:
{
"uri": "md://notes/project-plan.md",
"name": "Project Plan",
"description": "Auto-extracted from frontmatter or first paragraph",
"mimeType": "text/markdown"
}๐ ๏ธ MCP Tools
md-mcp provides three tools to Claude:
1. search_markdown
Search across all markdown files by content or filename.
Usage in Claude:
Standard (keyword): > "Search my notes for 'docker compose'"
โ ๏ธ Experimental features below: (may not work)
Semantic: > "Search my docs for 'user authentication' using semantic search" (Finds related concepts like login, OAuth, etc.)
Hybrid: > "Search for 'docker setup' using hybrid search" (Combines exact matching and conceptual matching)
(Note: Semantic and hybrid search require uv pip install "md-mcp[semantic]", or installing with the extra flag)
2. list_files
List all available markdown files.
Usage in Claude:
"What markdown files do I have about Python?"
3. rescan_folder
Manually rescan the folder for new, modified, or deleted markdown files. Use this if the automatic file watcher is not available or if files are missing.
Usage in Claude:
"Rescan the markdown folder to find my new notes"
๐ Requirements
Python 3.10+
mcp library
Claude Desktop
๐ง Configuration
Claude Desktop Config Location (Automatic)
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Antigravity Config Location (Manual)
Windows: %USERPROFILE%\.gemini\antigravity\mcp_config.json
Add your config and run Developer: Reload Window from the Command Palette (Ctrl+Shift+P).
Config Entry Format
# With uv installed
{
"mcpServers": {
"my-notes": {
"command": "uvx",
"args": [
"md-mcp",
"--folder", "C:\\Users\\Yang\\notes",
"--name", "my-notes"
]
}
}
}
# Without uv installed
{
"mcpServers": {
"my-notes": {
"command": "python",
"args": [
"-m", "md_mcp.server_runner",
"--folder", "C:\\Users\\Yang\\notes",
"--name", "my-notes"
]
}
}
}VS Code MCP Config (Manual)
For workspace-level tools, use a file at .vscode/mcp.json. See official VS Code MCP documentation.
For workspace configs, the top-level key is"servers", not "mcpServers".
Example .vscode/mcp.json:
{
"servers": {
"my-notes": {
"command": "uvx",
"args": [
"md-mcp",
"--folder", "C:\\Users\\Yang\\notes",
"--name", "my-notes"
]
}
}
}Sample Prompts to Test
Once configured, try these prompts with your AI assistant:
"Search my-notes for 'Docker'"
"List markdown files in my-notes"
"What do my notes say about the system architecture?"

๐งช Testing
Test the Scanner
from md_mcp.scanner import MarkdownScanner
scanner = MarkdownScanner("~/notes")
files = scanner.scan()
for f in files:
print(f"{f.name}: {f.description}")Test the Server Locally
# Run server directly (stdio mode)
uv run python -m md_mcp.server_runner --folder ~/notes --name test
# Server listens on stdin/stdout for MCP protocol๐ Markdown Frontmatter Support
md-mcp extracts metadata from YAML frontmatter:
---
title: My Document
description: A brief overview of the document
tags: [project, planning]
---
# Content starts hereExtracted fields:
descriptionโ Used as resource descriptionOther fields stored in
frontmatterdict
If no frontmatter, first paragraph is used as description.
๐ง Roadmap
v0.3: Smart chunking for large files
v0.4: Semantic search with embeddings
v1.0: Use web UI for all operations
๐ Troubleshooting
"Server not showing in Claude Desktop"
Check config was updated:
md-mcp --statusVerify file exists:
# Windows type %APPDATA%\Claude\claude_desktop_config.json # Mac/Linux cat ~/.config/Claude/claude_desktop_config.jsonRestart Claude Desktop completely
"No files found"
# Check what scanner finds
md-mcp --folder ~/notes --scan"Permission denied"
Make sure the folder is readable:
# Check permissions
ls -la ~/notes๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโ
โ Claude Desktop โ
โ (MCP Client) โ
โโโโโโโโโโฌโโโโโโโโโ
โ stdio (JSON-RPC)
โ
โโโโโโโโโโผโโโโโโโโโ
โ md-mcp Server โ
โ (MCP Protocol) โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโ
โ MarkdownScanner โ
โ (File Reader) โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโผโโโโโโโ
โ Filesystem โ
โ (*.md) โ
โโโโโโโโโโโโโโ๐ค Comparison to Alternatives
Feature | md-mcp | Manual MCP Server | File Upload |
Setup Time | 30 seconds | Hours | Per-session |
Auto-Updates | โ | โ | โ |
Full Folder | โ | โ | โ |
Search | โ | Custom | โ |
One Command | โ | โ | โ |
๐ Development
Setup Dev Environment
git clone https://github.com/ly2xxx/md-mcp.git
cd md-mcp
uv sync --extra dev
#Equivalent to (pip install -e ".[dev]")Run Tests
Run standard unit tests:
uv run pytestRun AI Agent integration tests (BDD + DeepEval):
uv run deepeval test run sample-client/tests/step_defs/test_search_markdown.pyThis project champions a new AI testing standard by combining Behavior-Driven Development (pytest-bdd) with LLM-as-a-judge metrics (DeepEval) to rigorously evaluate Agentic RAG workflows.

Format Code
uv run black md_mcp/๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Credits
Inspired by:
Model Context Protocol by Anthropic
netshare - File sharing tool by Yang Li
๐ฎ Contact
Issues: https://github.com/ly2xxx/md-mcp/issues
Built by: Yang Li Date: 2026-02-16
๐ Just point at a folder and go!

Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceEnables interaction between LLMs and Obsidian vaults through the Model Context Protocol, supporting secure file operations, content management, and advanced search capabilities.2,472657Apache 2.0
- AlicenseAqualityDmaintenanceA Model Context Protocol implementation that enables AI assistants to interact with markdown documentation files, providing capabilities for document management, metadata handling, search, and documentation health analysis.146458MIT
- Alicense-qualityDmaintenanceEnables AI models to seamlessly access and query local markdown technical documentation files, providing automatic documentation context without explicit prompting.175ISC
- Alicense-qualityDmaintenanceProvides direct access to local documentation files through simple search and overview tools, enabling LLMs to query project-specific markdown documentation without requiring vector databases or RAG pipelines.MIT
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Your portable context layer โ load it into any AI.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ly2xxx/md-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server