Labsco
MCP SERVER

Md PDF MCP

by seanivore

Turn a Markdown document into a PDF styled like VS Code's Markdown preview, without leaving the chat.

Document Conversion, PDF & Translation
Summary
One tool, one job: Markdown in, styled PDF out.

The conversion answers with the path it wrote or the error that stopped it, so the assistant can tell you whether the file exists instead of assuming. Worth knowing before you read the repo: the README still describes the note-storage template the project was scaffolded from — the PDF conversion is specified in docs/SPECIFICATION.md.

What it is

A Python server built on ReportLab that takes Markdown content and a destination path, and writes out a PDF with VS Code's Markdown typography applied.

What you get
  • `convert_markdown` — hand it the Markdown text and an output path, and the PDF lands on disk
  • A result you can act on: a success flag, the path of the generated PDF, and an error message when the conversion fails
  • VS Code's markdown.css typography, spacing and colours mapped onto ReportLab styles
  • A light theme and a high-contrast theme
  • Errors separated by cause — a Markdown parse error, a PDF generation failure and a filesystem error come back differently
Requirements

The README's install line names `md-pdf-mcp`, which PyPI does not have; from a local checkout the documented command is `uv --directory /path/to/md-pdf-mcp run md-pdf-mcp`. PDF generation depends on reportlab.