Pandoc MCP Server logo

Pandoc MCP Server

by MaitreyaM

A Python-based MCP server that provides document conversion capabilities via Pandoc. This server allows AI agents to request file conversions between various formats.

View on GitHub

Last updated: N/A

What is Pandoc MCP Server?

This is a Python-based MCP server that leverages Pandoc to provide document conversion services to AI agents. It exposes a single MCP tool, convert_document, allowing agents to convert files between various formats.

How to use Pandoc MCP Server?

The server can be run locally or using Docker. It accepts file conversion requests from MCP clients, specifying input and output file paths, the desired output format, and optional Pandoc arguments. The client then connects to the server's SSE endpoint to send and receive requests.

Key features of Pandoc MCP Server

  • Exposes a single MCP tool: convert_document

  • Supports a wide range of input and output formats handled by Pandoc

  • Allows specifying input format and output format

  • Supports passing extra command-line arguments to Pandoc

  • Includes Docker configuration for creating a self-contained server environment

  • Designed for integration with MCP clients, particularly LangChain/LangGraph agents

Use cases of Pandoc MCP Server

  • Converting Markdown files to PDF for report generation

  • Converting DOCX files to HTML for web publishing

  • Converting HTML files to Markdown for easier editing

  • Converting EPUB files to DOCX for further processing

FAQ from Pandoc MCP Server

What is Pandoc?

Pandoc is a universal document converter.

What is FastMCP?

FastMCP is a Python library for easily creating MCP servers.

What formats are supported?

A wide range of formats are supported, including Markdown, DOCX, HTML, PDF, EPUB, and many more. See Pandoc documentation for a full list.

How do I specify extra Pandoc arguments?

Use the extra_args parameter in the convert_document tool.

Do I need to install Pandoc separately if I use Docker?

No, the Docker image includes Pandoc and all necessary dependencies.