MD-PDF MCP Server

MD-PDF MCP Server is an MCP server that provides two-way document conversion tools between Markdown and PDF formats. It connects an AI agent running in Model Context Protocol clients directly to local conversion utilities powered by Pandoc and WeasyPrint. Developers, technical writers, and researchers use it to automate document generation and content extraction. The server enables clients to generate styled PDF files directly from raw Markdown text or existing Markdown files, offering preset layout options for compact, standard, and detailed document sizing. In reverse, it allows users to convert PDF documents back into clean Markdown files for text analysis and editing. Additionally, the server exposes targeted tools to extract plain text from specific page numbers within a PDF file and inspect PDF metadata such as document properties. By managing document rendering locally via standard command-line engines, it provides predictable formatting and automated conversion workflows directly within supported LLM development environments.

Category: Developer Tools & Code Intelligence

Tags: conversion, markdown, pandoc, pdf, weasyprint

Visit MD-PDF MCP Server

How to install and configure MD-PDF MCP Server

  1. Install the required system dependencies: Pandoc and WeasyPrint using brew install pandoc weasyprint, and install uv with curl -LsSf https://astral.sh/uv/install.sh | sh. 2. Clone the repository and run uv sync in the project root to install Python dependencies. 3. To use with Claude Desktop, add the server to your claude_desktop_config.json file: json { "mcpServers": { "md-pdf": { "command": "uv", "args": [ "--directory", "/absolute/path/to/md-pdf", "run", "main.py" ] } } } 4. For Cursor, add the server under Cursor settings with command: uv, args: ["run", "main.py"], and set cwd to /absolute/path/to/md-pdf. 5. Restart your client to start using the tools.

What you can do with MD-PDF MCP Server

• Generate formatted PDF reports directly from raw Markdown text strings using compact, standard, or detailed layout sizing options. • Batch convert existing Markdown files on your local file system into publication-ready PDF documents using WeasyPrint. • Transform received PDF files into editable Markdown documents to enable fast downstream content parsing and analysis. • Extract plain text contents from targeted PDF page ranges without processing the entire document. • Inspect PDF file metadata to extract file properties and document structures directly within AI workflows.

Key facts

  • Open Source
  • https://github.com/kareemaly/md-pdf-mcp
  • Developer Tools & Code Intelligence, Files, Documents & PDFs
  • conversion, markdown, pandoc, pdf, weasyprint

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP MD2PDF Server — MCP MD2PDF Server is an MCP server that enables automated conversion of Markdown documents into formatted PDF files with full…

What can MD-PDF MCP Server do?

MD-PDF MCP Server provides Model Context Protocol tools to convert Markdown text or files into PDF format, convert PDFs into Markdown, extract text from specified PDF pages, and retrieve document metadata. It supports multiple sizing presets including compact, standard, and detailed font and margin configurations.

How do I install MD-PDF MCP Server?

First install Pandoc and WeasyPrint along with the uv package manager. Clone the repository and execute uv sync to install the project dependencies. Then register the server in your MCP client configuration file by pointing the uv command to run main.py inside the repository directory.

Which MCP clients work with MD-PDF MCP Server?

It works with any standard Model Context Protocol client. The documentation explicitly provides configuration setups for Claude Desktop and Cursor by setting the command to run uv with main.py.

What dependencies are required to run MD-PDF MCP Server?

The server requires Python 3.13 or newer, the uv package manager, Pandoc (version 3.6.2 tested), and WeasyPrint installed on your local host system.

Is MD-PDF MCP Server open source?

Yes, MD-PDF MCP Server is an open-source project hosted on GitHub under the kareemaly/md-pdf-mcp repository.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories