Back to catalog

Pandoc MCP Server

MCP server for document format conversion using Pandoc, supporting transformation between Markdown, HTML, PDF, DOCX, LaTeX, EPUB, and other formats while preserving formatting and structure.

MCP server for document format conversion using Pandoc, supporting transformation between Markdown, HTML, PDF, DOCX, LaTeX, EPUB, and other formats while preserving formatting and structure.

Installation

UV Package Manager

uvx mcp-pandoc

From Source (for Development)

uv --directory <DIRECTORY>/mcp-pandoc run mcp-pandoc

Configuration

Claude Desktop (Published Version)

{
  "mcpServers": {
    "mcp-pandoc": {
      "command": "uvx",
      "args": ["mcp-pandoc"]
    }
  }
}

Claude Desktop (Development Version)

{
  "mcpServers": {
    "mcp-pandoc": {
      "command": "uv",
      "args": [
        "--directory",
        "<DIRECTORY>/mcp-pandoc",
        "run",
        "mcp-pandoc"
      ]
    }
  }
}

Available Tools

Tool Description
convert-contents Converts content between supported formats with options for input/output files, reference documents, and more

Features

  • Bidirectional conversion between 10+ document formats (Markdown, HTML, PDF, DOCX, RST, LaTeX, EPUB, TXT, IPYNB, ODT)
  • Support for reference documents to maintain consistent styling in DOCX files
  • YAML defaults files for reusable conversion templates
  • Custom Pandoc filters for advanced processing
  • Conversion options based on files and content
  • Advanced formatting preservation across formats

Usage Examples

Convert this text to PDF and save as /path/to/document.pdf
Convert /path/to/input.md to PDF and save as /path/to/output.pdf
Convert input.md to DOCX using template.docx as reference and save as output.docx
Convert docs.md to HTML with filters ['/path/to/mermaid-filter.py'] and save as docs.html
Convert paper.md to PDF using defaults academic-paper.yaml and save as paper.pdf

Notes

Requires pandoc installation (brew install pandoc). TeX Live installation is required for PDF conversion. For advanced formats (PDF, DOCX, RST, LaTeX, EPUB), full file paths with filename and extension are required. Currently in early development stage, PDF support is actively being improved.

Comments (0)

Sign In Sign in to leave a comment.