A Markdown-to-PDF converter with Mermaid diagram support, packaged as an MCP server in a Docker image. Works with Claude Code, VS Code Copilot, and any MCP-compatible client.
- Renders Mermaid diagrams (flowcharts, sequence, class, state, Gantt, pie, ER)
- Professional A4 landscape styling with custom CSS support
- Zero dependencies on the host — just Docker
claude mcp add md2pdf -- docker run --rm -i -v /home:/home ghcr.io/bluecontainer/md2pdf:latestThen ask Claude to "convert myfile.md to pdf".
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"md2pdf": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/home:/home", "ghcr.io/bluecontainer/md2pdf:latest"]
}
}
}Replace -v /home:/home with -v /Users:/Users:
claude mcp add md2pdf -- docker run --rm -i -v /Users:/Users ghcr.io/bluecontainer/md2pdf:latestPass a custom stylesheet by adding the css parameter when calling the tool. The CSS file must be accessible within the mounted volume.
You can also use the image directly from the command line:
docker run --rm -v /home:/home --entrypoint md-to-pdf \
ghcr.io/bluecontainer/md2pdf:latest /absolute/path/to/file.mdgit clone https://github.com/bluecontainer/md2pdf.git
cd md2pdf
docker build -t ghcr.io/bluecontainer/md2pdf:latest .