MD-PDF MCP Server
A server for converting Markdown files to PDF format. Requires pandoc and weasyprint.
MD-PDF MCP Server
A Model Context Protocol (MCP) server for converting between Markdown and PDF formats.
System Requirements
Tested on:
- macOS 14.3.0 (Darwin 23.3.0, ARM64)
- Python 3.13.0
- uv 0.7.13
- pandoc 3.6.2
Features
- Convert Markdown content/files to PDF with size options (small, medium, large)
- Convert PDF files to Markdown format
- Extract text from specific PDF pages
- Retrieve PDF metadata
MCP Tools
convert_markdown_to_pdf(markdown_content, output_filename, size, pdf_engine)convert_markdown_file_to_pdf(markdown_file_path, output_filename, size, pdf_engine)convert_pdf_to_markdown(pdf_file_path, output_filename)extract_text_from_pdf(pdf_file_path, page_numbers)get_pdf_info(pdf_file_path)
Installation
# Install dependencies
curl -LsSf https://astral.sh/uv/install.sh | sh
brew install pandoc weasyprint
# Setup project
uv sync
Running the Server
uv run python main.py
MCP Integration
Claude Desktop
{
"mcpServers": {
"md-pdf": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/md-pdf",
"run",
"main.py"
]
}
}
}
Cursor
Configure MCP in Cursor settings
{
"servers": {
"md-pdf": {
"command": "uv",
"args": ["run", "main.py"],
"cwd": "/absolute/path/to/md-pdf"
}
}
}
Size Options
s: 8pt font, 0.35in margins (compact)m: 9pt font, 0.5in margins (standard)l: 11pt font, 1in margins (detailed)
Project Structure
md-pdf/
├── data/ # Test files
├── tools/ # MCP tool definitions
├── utils/ # Conversion utilities
├── main.py # Server entry point
└── server.py # MCP server instance
Похожие серверы
iMCP
A macOS app that connects your digital life with AI, providing access to Calendar, Contacts, Location, Maps, Messages, Reminders, and Weather services.
Yachtsy MCP Server
Search, compare, and track sailboats with real-time listings, market insights, specs, and price history.
activity-mcp
An MCP server for interacting with various services like Slack, Harvest, and GitHub to manage activities and data.
@mcp-z/mcp-pdf
Create PDFs without leaving your workflow. Perfect for documentation, reports, and creative projects. Productive PDF generation with full Unicode and emoji support.
Heimdall
The all-seeing guardian for macOS: Battery, Clipboard, TTS, and File System control using Claude desktop
Signbee
Document signing for AI agents. Send contracts for e-signature via MCP with email OTP verification and SHA-256 signing certificates.
Obsidian Nexus
Connects directly to your local Obsidian vault for seamless note management and data organization.
Notebooklm mcp server
Let your AI agents chat directly with Google NotebookLM for zero-hallucination answers.
Anki MCP
A Model Context Protocol (MCP) server that provides seamless integration with Anki, enabling AI assistants to interact with your flashcard collection. Create, read, update, and manage Anki cards programmatically through a standardized interface.
WordPress MCP Server
Manage WordPress sites and create content with AI-generated featured images.