Pandoc

Pandoc

MCP server for converting documents between formats using Pandoc, with defaults and filters.

456
Stars
58
Forks
5
Releases

Overview

mcp-pandoc is a Model Context Protocol (MCP) server that enables document format conversion using Pandoc. It provides tooling to transform content between common formats while preserving formatting and structure, leveraging the Pandoc Python package as the conversion engine. The server is in early development; PDF support is under development and capabilities may evolve. Core functionality is exposed via the convert-contents tool, which accepts either raw contents or a path to an input file, and converts it to a target format. Options include input_format (default markdown), output_format (default markdown), and output_file (required for advanced formats such as pdf, docx, rst, latex, epub). Additional features include a reference_doc to style DOCX output and a defaults_file (YAML) to define reusable templates, plus optional pandoc filters. Supported formats include markdown, html, pdf, docx, rst, latex, epub, txt, ipynb, and odt, with bidirectional conversions among them. Prerequisites include Pandoc, the UV package, and, for PDF, TeX Live. Debugging can be aided by MCP Inspector, and the project aims to stay extensible within the MCP ecosystem.

Details

Owner
vivekVells
Language
Python
License
MIT License
Updated
2025-12-07

Features

convert-contents tool for cross-format transformations

Core tool that converts content between formats, accepting either contents or an input_file, with options for input_format, output_format, output_file, reference_doc, defaults_file, and filters.

Wide-format support

Bidirectional conversions across Markdown, HTML, TXT, DOCX, PDF, RST, LaTeX, EPUB, IPYNB, and ODT.

Defaults Files (YAML) configuration

Supports reusable conversion templates via YAML defaults files to standardize options and styling.

Pandoc Filters support

Allows applying custom Pandoc filters during conversion for enhanced processing.

DOCX styling via reference document

DOCX output can be styled using a reference document provided through the reference_doc option.

Bidirectional conversion matrix

Documentation includes a bidirectional matrix showing supported conversions between formats.

PDF output considerations

PDF is an advanced, output-only format that requires TeX Live; conversions to PDF are supported, conversions from PDF are not.

Prerequisites and environment

Requires Pandoc installation and UV package; PDF requires TeX Live; complete file paths are required for saving outputs.

Tags

pandocmcp-pandocdocument-conversionMCP servermarkdownhtmlpdfdocxrstlatexepubipynbodtpandoc-filtersyamldefaults