convert_markdown
Convert markdown to Word/PDF with optional .dotx template.
This tool converts markdown files to professional documents using python-docx. You can optionally provide a .dotx template file for consistent styling.
Turn a markdown file into a Word document that already carries your company styling — and a PDF from the same source.
LABSCO SUMMARY
The template is what this is for: apply a .dotx once and every document delivered afterwards matches it, instead of restyling by hand each time. Two things to plan around — PDF output depends on LibreOffice or Word being installed locally, and link text renders without being clickable in the output.
A converter from Markdown to .docx and .pdf, built on python-docx. Point it at a .dotx Word template and the output picks up that template's fonts, styles and layout.
No account and no key — it reads and writes files on your machine. Python 3.10 or newer; run it with uvx mcp-md-pdf, or pip install mcp-md-pdf and run python -m md_pdf_mcp.server. The PyPI package is mcp-md-pdf, currently 0.1.0. Producing Word documents needs nothing further, but PDF conversion needs a renderer on the machine: LibreOffice on macOS (brew install --cask libreoffice) or Linux (sudo apt-get install libreoffice), or Microsoft Word on Windows through COM automation, which also wants pywin32. There is no Docker image on purpose — the server takes absolute host paths, which a container cannot resolve.
One command — uvx mcp-md-pdf
USE CASES
Convert the markdown with your .dotx template applied, and take the .docx and .pdf from the same run.
Pass the list of markdown files with one template and format; outputs are named after the inputs in the directory you name.
Convert without a template — the default design handles headings, lists, tables and code blocks.
Ask for the supported formats and features first.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
convert_markdownConvert markdown to Word/PDF with optional .dotx template.
This tool converts markdown files to professional documents using python-docx. You can optionally provide a .dotx template file for consistent styling.
convert_markdown_batchBatch convert multiple markdown files to Word/PDF.
Converts a list of markdown files using the same template and format settings. Output files are named after input files and placed in the specified directory.
list_supported_formatsList all supported input/output formats and features.
Returns: Information about supported formats and features
BEFORE YOU INSTALL
3 tools when we connected.
Python 3.10+
All 3 documented setups run the server on your machine.
CONTEXT COST
Rated by the size of the 3 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
uvx mcp-md-pdf{
"mcpServers": {
"md-pdf": {
"command": "uvx",
"args": [
"mcp-md-pdf"
]
}
}
}{
"mcpServers": {
"md-pdf": {
"command": "python",
"args": [
"-m",
"md_pdf_mcp.server"
]
}
}
}{
"mcpServers": {
"md-pdf": {
"command": "python",
"args": [
"-m",
"md_pdf_mcp.server"
],
"env": {
"PYTHONPATH": "<YOUR_PATH_TO_MCP_MD_PDF>"
}
}
}
}