vivekVells/mcp-pandoc logo

vivekVells/mcp-pandoc

Free

使用 Pandoc 进行无缝文档格式转换(Markdown, HTML, PDF, DOCX, CSV 等)。

FreeFree tier
Type
Open Source

About vivekVells/mcp-pandoc

mcp-pandoc is a Model Context Protocol (MCP) server that leverages Pandoc for seamless document format conversion. It provides a 'convert-contents' tool that accepts source content or an input file and converts between 10+ formats including Markdown, HTML, PDF (under development), DOCX, RST, LaTeX, EPUB, TXT, IPYNB, and ODT. The server supports advanced features such as YAML defaults files for reusable conversion templates and custom Pandoc filters (e.g., Mermaid) for enhanced processing. It is officially included in the MCP servers open-source project and comes with a comprehensive cheatsheet for common workflows and a bidirectional conversion matrix.

Key Features

Converts between 10+ document formats: Markdown, HTML, PDF, DOCX, RST, LaTeX, EPUB, TXT, IPYNB, ODT
Uses Pandoc for format conversion while preserving structure
Supports YAML defaults files for reusable conversion configurations
Allows custom Pandoc filters (e.g., Mermaid) for enhanced processing
Provides both content string and file input options
Output file path required for advanced formats (PDF, DOCX, etc.)
Reference document styling support for DOCX output
Part of the official Model Context Protocol servers open-source project
Includes a cheatsheet with copy-paste examples and bidirectional conversion matrix
Demo video available on YouTube

Pros & Cons

Pros
  • Open source and free to use
  • Officially included in MCP servers project
  • Supports wide range of common document formats
  • Advanced configuration via YAML defaults and filters
  • Comprehensive cheatsheet and demo available
  • Active development and community (571 stars on GitHub)
Cons
  • PDF support is still under development
  • Early stage; features may change
  • Requires Pandoc installation on the server
  • Output file path is mandatory for some formats, limiting in-memory conversion
  • No built-in cloud deployment; requires self-hosting or MCP client

Best For

Convert Markdown files to PDF or DOCX for publishingConvert HTML content to EPUB for e-readersTransform LaTeX documents to DOCX for collaborative editingConvert Jupyter Notebooks (IPYNB) to Markdown or HTMLUse defaults files to standardize formatting across academic papersApply Mermaid filter to include diagrams in HTML output

FAQ

What document formats does mcp-pandoc support?
It supports bidirectional conversion between Markdown, HTML, TXT, DOCX, PDF (under development), RST, LaTeX, EPUB, IPYNB, and ODT.
How do I use defaults files?
You can create a YAML file with conversion options (e.g., table of contents, number sections) and specify it as the defaults_file parameter in the convert-contents tool.
Can I apply custom filters?
Yes, you can provide an array of Pandoc filter paths (e.g., mermaid-filter.py) to apply during conversion.
Is mcp-pandoc production-ready?
It is in early development; PDF support is under development and functionality may change.