Skip to main content
Glama

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

Related MCP server: MD-PDF MCP Server

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.

Available Tools

1 tool
convert_pdf_to_markdownA

Convert a PDF file to Markdown format using AI sampling.

Args: file_path: Local file path or URL to the PDF file output_dir: Optional output directory. Defaults to same directory as input file (for local files) or current working directory (for URLs) Returns: Dictionary containing: - output_file: Path to the generated markdown file - summary: Summary of the conversion task - pages_processed: Number of pages processed

Inputs: file_path (required), output_dir. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is singular and clearly defined as converting PDFs to Markdown, leaving no room for misselection.

    Naming Consistency5/5

    The single tool name follows a clear verb_noun pattern (convert_pdf_to_markdown), which is consistent with itself. Since there are no other tools, there is no inconsistency to evaluate, making it perfectly consistent by default.

    Tool Count2/5

    A single tool is too few for most server purposes, as it limits functionality and may indicate an incomplete or overly narrow scope. For a PDF conversion server, one tool is minimal and could benefit from additional related operations, such as batch processing or format validation.

    Completeness3/5

    The tool covers the core conversion task well, but there are notable gaps in the surface, such as no tools for handling errors, validating input formats, or managing multiple files. While the main function is present, the lack of supporting operations makes the set incomplete for robust PDF-to-Markdown workflows.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that enables bidirectional conversion between Markdown and PDF formats, including text extraction from specific pages and metadata retrieval. It supports customizable PDF output sizes and document processing through standard MCP tools.
      5
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that downloads PDF files from URLs and converts them to Markdown format. Supports custom file names and directories, with security measures like SSRF protection.
      -
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for high-quality bidirectional PDF ↔ Markdown conversion with full Unicode/CJK character support, enabling users to convert files via natural language commands.
      4
      MIT