Basic information
About File Format Converter (Pandoc) MCP Server
Convert files easily with File Format Converter (Pandoc): transform PDF, HTML, Markdown, HEIC to JPG, JPG to PDF, and more document formats.
File Format Converter (Pandoc) is a MCP server in the Productivity category listed in the AddMCP.net directory, published by vivekvells. It exposes 1 tool, including convert-contents. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 566 GitHub stars. Source code is hosted on github.com. Related topics: community, pandoc, pandoc-markdown, pandoc-template, productivity.
Setup
{
"mcpServers": {
"mcp-pandoc": {
"command": "uvx",
"args": [
"mcp-pandoc"
]
}
}
}
{
"mcpServers": {
"mcp-pandoc": {
"command": "uvx",
"args": [
"mcp-pandoc"
]
}
}
}
{
"servers": {
"mcp-pandoc": {
"command": "uvx",
"args": [
"mcp-pandoc"
]
}
}
}
File Format Converter (Pandoc) MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-pandoc": {
"command": "uvx",
"args": [
"mcp-pandoc"
]
}
}
}
File Format Converter (Pandoc) MCP Server tools
- convert-contents — Converts content between different formats. Transforms input content from any supported format into the specified output format. 🚨 CRITICAL REQUIREMENTS - PLEASE READ: 1. PDF Conversion: * You MUST install TeX Live BEFORE attempting PDF conversion: * Ubuntu/Debian: `sudo apt-get install texlive-xetex` * macOS: `brew install texlive` * Windows: Install MiKTeX or TeX Live from https://miktex.org/ or https://tug.org/texlive/ * PDF conversion will FAIL without this installation 2. File Paths - EXPLICIT REQUIREMENTS: * When asked to save or convert to a file, you MUST provide: - Complete directory path - Filename - File extension * Example request: 'Write a story and save as PDF' * You MUST specify: '/path/to/story.pdf' or 'C:\Documents\story.pdf' * The tool will NOT automatically generate filenames or extensions 3. File Location After Conversion: * After successful conversion, the tool will display the exact path where the file is saved * Look for message: 'Content successfully converted and saved to: [file_path]' * You can find your converted file at the specified location * If no path is specified, files may be saved in system temp directory (/tmp/ on Unix systems) * For better control, always provide explicit output file paths Supported formats:- Basic: txt, html, markdown, ipynb, odt- Advanced (REQUIRE complete file paths): pdf, docx, rst, latex, epub✅ CORRECT Usage Examples: 1. 'Convert this text to HTML' (basic conversion) - Tool will show converted content 2. 'Save this text as PDF at /documents/story.pdf' - Correct: specifies path + filename + extension - Tool will show: 'Content successfully converted and saved to: /documents/story.pdf' ❌ INCORRECT Usage Examples: 1. 'Save this as PDF in /documents/' - Missing filename and extension 2. 'Convert to PDF' - Missing complete file path When requesting conversion, ALWAYS specify: 1. The content or input file 2. The desired output format 3. For advanced formats: complete output path + filename + extension Example: 'Convert this markdown to PDF and save as /path/to/output.pdf' 🎨 DOCX STYLING (NEW FEATURE): 4. Custom DOCX Styling with Reference Documents: * Use reference_doc parameter to apply professional styling to DOCX output * Create custom templates with your branding, fonts, and formatting * Perfect for corporate reports, academic papers, and professional documents * Example: 'Convert this report to DOCX using /templates/corporate-style.docx as reference and save as /reports/Q4-report.docx' 🎯 PANDOC FILTERS (NEW FEATURE): 5. Pandoc Filter Support: * Use filters parameter to apply custom Pandoc filters during conversion * Filters are Python scripts that modify document content during processing * Perfect for Mermaid diagram conversion, custom styling, and content transformation * Example: 'Convert this markdown with mermaid diagrams to DOCX using filters=["./filters/mermaid-to-png-vibrant.py"] and save as /reports/diagram-report.docx' 📋 Creating Reference Documents: * Generate template: pandoc -o template.docx --print-default-data-file reference.docx * Customize in Word/LibreOffice: fonts, colors, headers, margins * Use for consistent branding across all documents 📋 Filter Requirements: * Filters must be executable Python scripts * Use absolute paths or paths relative to current working directory * Filters are applied in the order specified * Common filters: mermaid conversion, color processing, table formatting 📄 Defaults File Support (NEW FEATURE): 7. Pandoc Defaults File Support: * Use defaults_file parameter to specify a YAML configuration file * Similar to using pandoc -d option in the command line * Allows setting multiple options in a single file * Options in the defaults file can include filters, reference-doc, and other Pandoc options * Example: 'Convert this markdown to DOCX using defaults_file="/path/to/defaults.yaml" and save as /reports/report.docx' Note: After conversion, always check the success message for the exact file location.
Overview
What is File Format Converter (Pandoc)?
mcp-pandoc is a Model Context Protocol server for document format conversion using pandoc. It provides tools to transform content between different document formats while preserving formatting and structure, and is officially included in the Model Context Protocol servers open-source project.
How to use File Format Converter (Pandoc)?
Install pandoc and the uv package manager, then configure your MCP client (e.g., Claude Desktop) with the mcpServers entry using uvx mcp-pandoc. The server exposes one tool, convert-contents, which accepts source content or an input file, source/target formats, an optional output file, a reference document for DOCX styling, a defaults file, and Pandoc filters.
Key features of File Format Converter (Pandoc)
- Single tool
convert-contentsfor all conversions - Supports 10 formats: markdown, HTML, TXT, DOCX, PDF, RST, LaTeX, EPUB, IPYNB, ODT
- Bidirectional conversion between all supported formats (PDF output only)
- Advanced features: defaults files (YAML) and Pandoc filters
- DOCX output supports custom styling via reference documents
- Basic conversions display in chat; advanced formats require output file path
Use cases of File Format Converter (Pandoc)
- Convert Markdown notes to PDF or DOCX documents
- Convert HTML content to EPUB for e‑readers
- Transform Jupyter notebooks (IPYNB) to Markdown or HTML
- Batch convert multiple files between formats using defaults templates
- Produce styled DOCX files with custom reference document templates
Frequently asked questions
1 How do I convert content using the `convert-contents` tool?
Provide either the contents string or an input_file path, plus the desired input_format and output_format. For advanced formats (PDF, DOCX, RST, LaTeX, EPUB) you must also supply an output_file path.
2 Does mcp-pandoc support PDF conversion?
PDF is supported as an output‑only format. Converting from PDF to other formats is not supported. PDF generation requires TeX Live to be installed.
3 What are the critical requirements before using mcp-pandoc?
You must install pandoc itself, the uv package manager (which provides the uvx command), and optionally TeX Live for PDF output. Complete file paths with filename and extension are mandatory when saving files.
4 Can I customize the styling of DOCX output?
Yes, you can provide a reference document (.docx or created via pandoc -o reference.docx --print-default-data-file reference.docx) to override default styles. This works only for DOCX output.
5 What formats are supported and what are the format categories?
Formats are split into Basic (MD, HTML, TXT, IPYNB, ODT – no extra requirements) and Advanced (DOCX, PDF, RST, LaTeX, EPUB – require an output file path). All formats can be bidirectionally converted except PDF (output only).
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In