Skip to main content
Glama

PDF2MD MCP Server

by gavinHuang

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.

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

An MCP server that converts PDF files to Markdown format using AI sampling capabilities, supporting both local files and URLs with incremental conversion features.

  1. Features
    1. Installation
      1. Usage
        1. As an MCP Server
        2. Available Tools
      2. Requirements
        1. Development
          1. Setup
          2. Running Tests
          3. Code Formatting
        2. License
          1. Contributing

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              MCP server for seamless document format conversion using Pandoc, supporting Markdown, HTML, PDF, DOCX (.docx), csv and more.
              Last updated -
              1
              285
              Python
              MIT License
              • Apple
            • A
              security
              F
              license
              A
              quality
              An MCP server for converting Markdown documents to PDF files.
              Last updated -
              1
              1
              JavaScript
            • -
              security
              A
              license
              -
              quality
              An MCP server that provides multiple file conversion tools for AI agents, supporting various document and image format conversions including DOCX to PDF, PDF to DOCX, image conversions, Excel to CSV, HTML to PDF, and Markdown to PDF.
              Last updated -
              12
              Python
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              An MCP server that exports PDF documents to markdown format optimized for LLM processing.
              Last updated -
              Python
              BSD 3-Clause

            View all related MCP servers

            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/gavinHuang/pdf2md-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server