About Md2pdf
Md2pdf is an MCP server published by chunliu in the Content category: a Model Context Protocol (MCP) server that enables LLMs to convert Markdown text or files into high-quality PDFs. It uses **Pandoc** for document conversion and **Tectonic** (a modern LaTeX engine) for professional typesetting.
Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/chunliu/md2pdfThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Tools (5)
annotationsMetadata including audience, priority, and last modified timestamp
Parameters not published.
mimeType"application/pdf"
Parameters not published.
nameGenerated filename (UUID-based)
Parameters not published.
type"resource_link"
Parameters not published.
uriFile URI of the generated PDF
Parameters not published.
Ask AI
Ask AI about Md2pdf
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
4 checks have not been run yet.
README
md2pdf-mcp
MCP Server for Markdown to PDF conversion.
Description
This server provides a tool to convert Markdown text to PDF files using the convert_markdown library. It's designed to work as an MCP (Model Context Protocol) server that can be integrated with various AI assistants and applications.
Features
- Convert Markdown text to well-formatted PDF files
- Random filename generation using UUID to avoid conflicts
- Configurable output directory via environment variables
- Returns resource links with metadata for easy integration
- Built on FastMCP for reliable MCP server functionality
Installation
You can install and run this tool using uvx:
uvx --from md2pdf-mcp md2pdf
Usage
As MCP Server
Configure the server in your MCP client configuration:
{
"mcpServers": {
"md2pdf": {
"command": "uvx",
"args": ["--from", "md2pdf-mcp", "md2pdf"],
"env": {
"PDF_OUTPUT_DIR": "/path/to/output/folder"
}
}
}
}
Available Tools
The server provides one tool:
convert_md_to_pdf
Converts Markdown text to a PDF file.
Parameters:
markdown_text(string): The Markdown content to convert
Returns: A JSON string containing:
type: "resource_link"uri: File URI of the generated PDFname: Generated filename (UUID-based)mimeType: "application/pdf"annotations: Metadata including audience, priority, and last modified timestamp
Environment Variables
PDF_OUTPUT_DIR: Directory where PDF files will be saved (defaults to user's home directory)
Example Usage
Once the server is running, you can call the tool through your MCP client:
{
"mcpServers": {
"md2pdf": {
"command": "uvx",
"args": ["--from", "md2pdf-mcp", "md2pdf"],
"env": {
"PDF_OUTPUT_DIR": "/path/to/output/folder"
}
}
}
}
License
MIT License
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.