An MCP (Model Context Protocol) server that converts PDF files to Markdown format using AI sampling capabilities.
- Convert PDF files to Markdown using AI content extraction
 - Support for both local file paths and URLs
 - Incremental conversion - resume from where you left off
 - Configurable output directory
 - Built with FastMCP for high performance
 
pip install pdf2md-mcpStart the server:
pdf2md-mcpThe server will expose MCP tools for PDF to Markdown conversion.
Converts a PDF file to Markdown format using AI sampling.
Parameters:
file_path(string): Local file path or URL to the PDF fileoutput_dir(string, optional): Output directory for the markdown file. Defaults to the same directory as input file (for local files) or current working directory (for URLs)
Returns:
output_file: Path to the generated markdown filesummary: Summary of the conversion taskpages_processed: Number of pages processed
- Python 3.10+
 - An MCP-compatible client with AI sampling capabilities
 - Network access for URL-based PDF files
 
git clone https://github.com/shuminghuang/pdf2md-mcp.git
cd pdf2md-mcp
pip install -e ".[dev]"pytestblack .
isort .MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.