Skip to content

Releases: costajohnt/mermaid-to-pdf-vscode

v1.0.0 - CLI Tool and MCP Server Release

04 Aug 21:03

Choose a tag to compare

Mermaid to PDF v1.0.0

This release includes both the CLI tool and MCP server for converting Markdown with Mermaid diagrams to high-quality PDFs.

📦 Published Packages

CLI Tool

  • Package: mermaid-to-pdf-cli@1.0.2
  • Install: npm install -g mermaid-to-pdf-cli
  • Usage: mermaid-to-pdf input.md [output.pdf]

MCP Server

  • Package: mermaid-to-pdf-mcp-server@1.0.7
  • Install: npm install -g mermaid-to-pdf-mcp-server
  • Usage: Configure in Claude Desktop MCP settings

✨ Key Features

  • High-Quality PDF Generation: Professional PDFs with crisp Mermaid diagrams
  • Multiple Diagram Types: Flowcharts, sequence diagrams, class diagrams, ER diagrams, and more
  • CLI Tool: Standalone command-line interface for batch processing
  • MCP Server: Claude Desktop integration for interactive document creation
  • Browser Rendering: Uses Puppeteer for accurate diagram rendering with 2x scale factor
  • Hybrid Approach: CLI tool integration with browser fallback for reliability

🔧 Technical Improvements

  • Fixed MCP server timeout issues with proper browser cleanup
  • Resolved JSON-RPC protocol violations by redirecting logs to stderr
  • Implemented proper browser pooling and diagram caching
  • Added comprehensive error handling and validation
  • Optimized diagram sizing with deviceScaleFactor and viewport settings

🚀 Getting Started

CLI Tool

npm install -g mermaid-to-pdf-cli
echo "# Test Doc\n\`\`\`mermaid\nflowchart TD\n  A --> B\n\`\`\`" > test.md
mermaid-to-pdf test.md

MCP Server (Claude Desktop)

{
  "mcpServers": {
    "mermaid-to-pdf": {
      "command": "mermaid-to-pdf-mcp",
      "args": []
    }
  }
}

🐛 Bug Fixes

  • Fixed ZodError validation issues in MCP protocol communication
  • Resolved browser hanging and timeout problems
  • Fixed small diagram sizing in generated PDFs
  • Corrected version mismatch between package.json and server metadata

📚 Documentation

Both packages include comprehensive documentation and examples. The MCP server includes custom instructions for optimal LLM integration.

v0.0.1 - Initial Release

03 Aug 14:41

Choose a tag to compare

🎉 Initial Release of Mermaid to PDF VSCode Extension

Features

  • 📄 Convert Markdown files with Mermaid diagrams to PDF
  • 🎨 Automatic Mermaid diagram rendering as embedded images
  • 📐 Compact PDF layout with optimized spacing
  • 🖱️ Right-click context menu integration
  • 📊 Progress notifications during conversion
  • 🔧 Support for all Mermaid diagram types
  • 🤖 Optional MCP server integration for AI assistants

Installation

  1. Download mermaid-to-pdf-0.0.1.vsix from the assets below
  2. Install in VSCode:
    code --install-extension mermaid-to-pdf-0.0.1.vsix
  3. Reload VSCode window

Usage

  • Right-click any .md file → "Convert Markdown to PDF with Mermaid"
  • Or use Command Palette: Cmd+Shift+P → "Convert Markdown to PDF"

What's Next

  • VSCode Marketplace publishing (coming soon)
  • Additional diagram customization options
  • Performance improvements for large documents

Thank you for trying out the extension! Please report any issues or feature requests.