The mcp-pandoc server provides document format conversion capabilities using Pandoc, allowing you to transform content between different formats while preserving structure and formatting. This tool integrates with Claude AI through the Model Context Protocol (MCP).
Before using mcp-pandoc, you must install several dependencies:
Pandoc - The core document conversion engine:
# macOS
brew install pandoc
# Ubuntu/Debian
sudo apt-get install pandoc
# Windows
# Download installer from: https://pandoc.org/installing.html
Verify installation with: pandoc --version
UV Package - Includes the required uvx
command:
# macOS
brew install uv
# Windows/Linux
pip install uv
Verify installation with: uvx --version
TeX Live (only needed for PDF conversion):
# 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/
Add the following configuration to your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-pandoc": {
"command": "uvx",
"args": ["mcp-pandoc"]
}
}
}
Alternatively, you can install the server automatically:
npx -y @smithery/cli install mcp-pandoc --client claude
The mcp-pandoc server provides a convert-contents
tool with the following options:
Basic formats (direct conversion):
Advanced formats (requires file paths):
To convert content from one format to another:
Ask Claude: "Convert this markdown to HTML:
# Hello World
This is **bold** and *italic* text."
For advanced formats, always provide complete file paths:
Ask Claude: "Convert /path/to/input.md to PDF and save as /path/to/output.pdf"
When converting to formats like PDF, you must specify an output file path:
Ask Claude: "Convert this text to PDF and save as /path/to/document.pdf:
# Important Document
This contains important information that needs to be preserved."
File Path Requirements:
PDF Conversion:
Format Support:
PDF Conversion Fails
File Conversion Fails
/path/to/document.pdf
instead of just /path/to/
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.