Skip to main content

MCP Server for Markdown to PDF conversion

Project description

md2pdf

MCP Server for Markdown to PDF conversion.

Description

This server provides a tool to convert Markdown text to PDF files using WeasyPrint. 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
  • Professional styling with clean typography
  • Support for code highlighting, tables, and other Markdown extensions
  • Configurable output directory via environment variables
  • Random filename generation to avoid conflicts

Installation

You can install and run this tool using uvx:

uvx md2pdf

Or install it permanently:

pip install md2pdf

Usage

As MCP Server

Run the server:

{
    "mcpServers": {
        "serper": {
            "command": "uvx",
            "args": ["md2pdf"],
            "env": {
                "PDF_OUTPUT_DIR": "<Output folder>"
            }
        }
    }
}

Environment Variables

  • PDF_OUTPUT_DIR: Directory where PDF files will be saved (defaults to home directory)

Requirements

  • Python 3.8+
  • WeasyPrint dependencies (may require system packages for PDF generation)

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md2pdf_mcp-0.1.2.tar.gz (160.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md2pdf_mcp-0.1.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file md2pdf_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: md2pdf_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 160.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.0

File hashes

Hashes for md2pdf_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4bbf14ca829a8b2d7ea4efca8119cf202b1cdeda17a9d5eefa42a9079aeb3b72
MD5 2bc46f8e82c4a25719a239578100d52a
BLAKE2b-256 15336a5b7d9c4702f0d4e1f3c4776fc2c157271e706c7779a0b3516377c13b3a

See more details on using hashes here.

File details

Details for the file md2pdf_mcp-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for md2pdf_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dcf9a48482a553198766bfa846c54d8f79ee4ec3460957c82dd1b883eecaa424
MD5 8e675bd2b14c761030b87d808ec3188a
BLAKE2b-256 1e9930330bb1ef209bfee57937bb6449ca7ce1853336510774b49e5375487c5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page