PDF2MD MCP Server
An MCP (Model Context Protocol) server that converts PDF files to Markdown format using AI sampling capabilities.
Features
- 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
Installation
pip install pdf2md-mcp
Usage
As an MCP Server
Start the server:
pdf2md-mcp
The server will expose MCP tools for PDF to Markdown conversion.
Available Tools
convert_pdf_to_markdown
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
Requirements
- Python 3.10+
- An MCP-compatible client with AI sampling capabilities
- Network access for URL-based PDF files
Development
Setup
git clone https://github.com/shuminghuang/pdf2md-mcp.git
cd pdf2md-mcp
pip install -e ".[dev]"
Running Tests
pytest
Code Formatting
black .
isort .
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for pdf2md-mcp-fastmcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pdf2md_mcp_fastmcp-0.1.2.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdf2md_mcp_fastmcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / pdf2md_mcp_fastmcp-0.1.2.tar.gz
| Download URL | pdf2md_mcp_fastmcp-0.1.2.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80ac98baefa9f7d221dce66cd0203e6dc317b488ad289ed4b0684424557053e4
|
|
BLAKE2b-256 checksum How to use checksums |
9801fb8772393a292b8687e2c2a088ead94e03ecfb91e30602ed2e3b1eceb3be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / pdf2md_mcp_fastmcp-0.1.2-py3-none-any.whl
| Download URL | pdf2md_mcp_fastmcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ed4fa0cae4a011f104de1d9b11b20a2dd90ca96320df2a23f35fb0a6164e9c6
|
|
BLAKE2b-256 checksum How to use checksums |
b179e2b2649f71ce8514d7c056835aedf5e76a94c2de6b83bbba70738e43370f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|