The MCP Pandoc server provides document format conversion capabilities through the Model Context Protocol. It allows you to seamlessly transform content between various formats like Markdown, HTML, PDF, DOCX, and more while preserving structure and formatting.
To add the MCP Pandoc server to Claude Desktop, you'll need to edit the configuration file:
MacOS: Open the config file with:
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: Edit the config file at:
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration to the file:
{
"mcpServers": {
"mcp-pandoc": {
"command": "uvx",
"args": ["mcp-pandoc"]
}
}
}
For a more streamlined installation, you can use Smithery:
npx -y @smithery/cli install mcp-pandoc --client claude
Before attempting PDF conversion, you must install TeX Live:
# 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/
The primary tool provided is convert-contents
, which transforms content between supported formats.
Basic formats (direct conversion):
Advanced formats (requires complete file paths):
contents
(string): Source content to convert (required if input_file not provided)input_file
(string): Complete path to input file (required if contents not provided)input_format
(string): Source format of the content (defaults to markdown)output_format
(string): Target format (defaults to markdown)output_file
(string): Complete path for output file (required for pdf, docx, rst, latex, epub formats)Convert this markdown to HTML:
# My Document
This is a **bold** statement with *italics*.
- Item 1
- Item 2
Convert /Users/me/Documents/report.md to PDF and save as /Users/me/Documents/report.pdf
File Path Requirements
Format-Specific Requirements
PDF Conversion Fails
File Conversion Fails
Format Conversion Fails
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.