MD-PDF MCP Server
An MCP server that enables bidirectional conversion between Markdown and PDF formats, including text extraction from specific pages and metadata retrieval. It supports customizable PDF output sizes and document processing through standard MCP tools.
README
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.