Skip to main content

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 file
  • output_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 file
  • summary: Summary of the conversion task
  • pages_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.

Release files for pdf2md-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdf2md-mcp 0.1.1
File Size Uploaded
pdf2md_mcp-0.1.1.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdf2md-mcp 0.1.1
File Interpreter ABI Platform
pdf2md_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / pdf2md_mcp-0.1.1.tar.gz

Download URL pdf2md_mcp-0.1.1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b3ecd64cb2a8c7d537f57c236416ba14065470d9654b25fe4622fcb71e4bf72a
BLAKE2b-256 checksum
How to use checksums
a1056183555ad2c23fc71f7557827b42dc7c7c901e3f0aaf328a765a97ee4806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.9

Release files / pdf2md_mcp-0.1.1-py3-none-any.whl

Download URL pdf2md_mcp-0.1.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c511ac57d7f948ef5e509147197ebcf63b84474b462b9e1836923c9e2b6aab95
BLAKE2b-256 checksum
How to use checksums
2c8c14fa652ea58beded0e28996a7798abb3661786285d683301f36aa75e0d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page