MCP-MD-PDF: Markdown to Word/PDF Converter is an MCP server that converts local Markdown files into formatted Word (.docx) and PDF documents with support for custom Word (.dotx) templates. Built for developers, technical writers, and consultants who draft notes and technical documentation in Markdown, the server bridges the gap between plain text source files and formal client-ready deliverables. It allows connected AI clients to automate the conversion flow directly through tool calls, outputting docx, pdf, or both formats simultaneously while preserving visual elements such as headings, code blocks, blockquotes, tables, and nested lists. By applying custom dotx templates, users maintain consistent company branding, custom fonts, color schemes, and page margins without repetitive manual editing. DOCX generation works natively without external dependencies, while PDF export leverages LibreOffice or Microsoft Word via COM automation to retain exact layouts, borders, and visual styles.
Category: Developer Tools & Code Intelligence
Tags: conversion, docx, markdown, pdf, templates
Visit MCP-MD-PDF: Markdown to Word/PDF Converter
brew install --cask libreoffice) or Linux (sudo apt-get install libreoffice), or install pywin32 on Windows with Microsoft Word. 2. Open your Claude Desktop configuration file at %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS). 3. Add the server entry under the mcpServers object: json { "mcpServers": { "md-pdf": { "command": "uvx", "args": ["mcp-md-pdf"] } } } 4. Restart Claude Desktop to apply the changes.Part of MCP Servers
You can run the server directly using uvx mcp-md-pdf without cloning code, or install it via pip using pip install mcp-md-pdf. Configure the server entry in your claude_desktop_config.json file under the mcpServers key, specifying uvx or python as the command, then restart your client.
The server exposes three main MCP tools: convert_markdown to convert an individual file to docx, pdf, or both; convert_markdown_batch to convert multiple Markdown files into an output directory using a shared template; and list_supported_formats to inspect supported formats and capabilities.
Generating DOCX files works out of the box without extra software. PDF conversion requires LibreOffice on macOS and Linux, or either Microsoft Word with pywin32 or LibreOffice on Windows. LibreOffice preserves the full styling, code block formatting, and templates produced in the DOCX stage.
Yes, MCP-MD-PDF is open source software released under the MIT license. Its source code, issue tracker, and documentation are hosted on GitHub at sham-devs/mcp-md-pdf.