Skip to main content

Instantly expose markdown folders as MCP servers for Claude Desktop

Project description

md-mcp

Instantly expose markdown folders as MCP servers for Claude Desktop.

A lightweight Python library that makes your markdown documentation, notes, and knowledge bases instantly available to Claude via the Model Context Protocol (MCP).


๐Ÿš€ Quick Start

Install

pip install -e .

Basic Usage

# Expose a folder of markdown files
md-mcp --folder ~/Documents/notes --name "My Notes"

# That's it! Restart Claude Desktop and it's available.

๐Ÿ“‹ Features

  • Zero Configuration: Just point at a folder and go
  • Auto-Discovery: Recursively finds all .md files
  • Metadata Extraction: Parses frontmatter and descriptions
  • Search Support: Built-in search across all files
  • Claude Integration: Automatically updates Claude Desktop config

๐ŸŽฏ 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


๐Ÿ“– Usage

Add 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 exposed

List Configured Servers

md-mcp --list
# Shows all md-mcp servers

Show Configuration Status

md-mcp --status
# Shows Claude config path and all servers

Remove a Server

md-mcp --remove "My Docs"

Interactive Mode

md-mcp
# Prompts for folder path

๐Ÿ”ง How It Works

  1. You run the CLI:

    md-mcp --folder ~/notes --name "Notes"
    
  2. md-mcp:

    • Scans folder for .md files
    • Extracts metadata (frontmatter, descriptions)
    • Updates Claude Desktop config
    • Registers MCP server entry
  3. 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 two tools to Claude:

1. search_markdown

Search across all markdown files by content or filename.

Usage in Claude:

"Search my notes for 'docker compose'"

2. list_files

List all available markdown files.

Usage in Claude:

"What markdown files do I have about Python?"


๐Ÿ“‹ Requirements

  • Python 3.8+
  • mcp library
  • Claude Desktop

๐Ÿ”ง Configuration

Claude Desktop Config Location

Windows: %APPDATA%\Claude\claude_desktop_config.json

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Linux: ~/.config/Claude/claude_desktop_config.json

Config Entry Format

{
  "mcpServers": {
    "my-notes": {
      "command": "C:\\Python\\python.exe",
      "args": [
        "-m", "md_mcp.server_runner",
        "--folder", "C:\\Users\\Yang\\notes",
        "--name", "my-notes"
      ]
    }
  }
}

๐Ÿงช 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)
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 here

Extracted fields:

  • description โ†’ Used as resource description
  • Other fields stored in frontmatter dict

If no frontmatter, first paragraph is used as description.


๐Ÿšง Roadmap

  • v0.2: File watching / live reload
  • v0.3: Semantic search with embeddings
  • v0.4: Multi-format support (txt, org, etc.)
  • v0.5: Smart chunking for large files
  • v1.0: GUI for managing servers

๐Ÿ› Troubleshooting

"Server not showing in Claude Desktop"

  1. Check config was updated:

    md-mcp --status
    
  2. Verify file exists:

    # Windows
    type %APPDATA%\Claude\claude_desktop_config.json
    
    # Mac/Linux
    cat ~/.config/Claude/claude_desktop_config.json
    
  3. Restart 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 โŒ (v0.2) โŒ โŒ
Full Folder โœ… โœ… โŒ
Search โœ… Custom โŒ
One Command โœ… โŒ โŒ

๐Ÿ“š Development

Setup Dev Environment

git clone https://github.com/ly2xxx/md-mcp.git
cd md-mcp
pip install -e ".[dev]"

Run Tests

pytest

Format Code

black md_mcp/

๐Ÿ“„ License

Dual Licensed: GPL-3.0 + Commercial

Free (GPL-3.0)

This software is free for open-source use under the GNU General Public License v3.0.

Who can use GPL-3.0 for free:

  • โœ… Open-source projects
  • โœ… Personal/educational use
  • โœ… Research projects
  • โœ… Any project complying with GPL terms

Commercial License

For proprietary/closed-source use, a commercial license is available.

Pricing (when available):

  • Startups (<10 employees): $299/year
  • Business (10-100): $999/year
  • Enterprise (100+): $4,999/year

Commercial license includes:

  • Use in proprietary software
  • No GPL obligations
  • Priority support
  • Custom features

Contact: victorlee2012.vl@gmail.com

See LICENSE file for full details.


๐Ÿ™ Credits

Inspired by:


๐Ÿ“ฎ Contact

Issues: https://github.com/ly2xxx/md-mcp/issues


Built by: Yang Li
Date: 2026-02-16
Version: 0.1.0 (MVP)

๐Ÿš€ Just point at a folder and go!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md_mcp-0.3.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md_mcp-0.3.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file md_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: md_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for md_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 94b8f5dbb11a4ef148be4168efb58f416fd846e2877cdceea530134be3fdbd4e
MD5 f2d85208cf4e0ff4b0d8aaba746ad7df
BLAKE2b-256 658eb67bfcbf6da427aadab866d9be47fff3dcb798b99e54a4fd3e7685100c6e

See more details on using hashes here.

File details

Details for the file md_mcp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: md_mcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for md_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 580fbe1229e7f9ff26e0b6d71697fa568a15f85c10a088370fe0ad3c3a51794c
MD5 e00acdcb6047a47bcf9658b6b7e2e9a0
BLAKE2b-256 2c731c91b27b7f221d275a6b4a7d1c33c3f5a044e9dbaa241e86125c6ca084dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page