Skip to main content

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 PDF
  • name: 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

Metadata

Release files for md2pdf-mcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md2pdf-mcp 0.1.4
File Size Uploaded Provenance
md2pdf_mcp-0.1.4.tar.gz 160.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for md2pdf-mcp 0.1.4
File Interpreter ABI Platform
md2pdf_mcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 163.4 kB

Release files / md2pdf_mcp-0.1.4.tar.gz

Download URL md2pdf_mcp-0.1.4.tar.gz
Size 160.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2c46bef653c4a5297493e57f926c0771356bf1838639846e063806bffc01830a
BLAKE2b-256 checksum
How to use checksums
2dbda3d3cfccec12a570a5789c062a79926de6dcca1893cba2ba71a73a3e55d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.0

Release files / md2pdf_mcp-0.1.4-py3-none-any.whl

Download URL md2pdf_mcp-0.1.4-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
971b3c089c5d3e856a62eb5ae7935b8b427c78336d2f245b7b452b40bc89c64f
BLAKE2b-256 checksum
How to use checksums
7d3befce0ca45d4c1fbf847c03499139ac99faeb4c13da409db33835de107899
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.0

Security for md2pdf-mcp 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page