npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

md-mmd-to-pdf-mcp

v1.0.0

Published

A Model Context Protocol (MCP) server that converts Markdown files and content to PDF using Puppeteer

Readme

md-mermaid-to-pdf-mcp

npm version License: MIT

A powerful Model Context Protocol (MCP) server that converts Markdown files and content to beautifully styled PDFs with Mermaid diagram support.

✨ Features

  • 🔄 Two conversion modes: File-to-PDF and content-to-PDF
  • 📊 Mermaid diagrams: Automatic rendering of flowcharts, sequence diagrams, and more
  • 🎨 Modern styling: Professional typography with Inter font and syntax highlighting
  • 📄 Multiple formats: A4, A3, A5, Letter, Legal, Tabloid
  • ⚙️ Configurable margins: Custom spacing in inches, mm, cm
  • 📝 Front matter support: YAML metadata for document properties
  • 🎯 Accessibility: Tagged PDFs with proper outline structure

🚀 Quick Start

Option 1: Use with npx (Recommended)

npx md-mmd-to-pdf-mcp

Option 2: Global Installation

npm install -g md-mmd-to-pdf-mcp
md-mmd-to-pdf-mcp

🔧 Claude Desktop Integration

Add to your Claude Desktop configuration:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "markdown-pdf": {
      "command": "npx",
      "args": ["md-mmd-to-pdf-mcp"]
    }
  }
}

Restart Claude Desktop after configuration.

📖 Usage Examples

Convert Markdown File to PDF

"Convert my README.md file to PDF and save it as documentation.pdf"

Convert Markdown Content to PDF

"Take this markdown content and create a PDF with A4 format:
# My Document
This is **bold** text with a [link](https://example.com)
"

Custom Formatting

"Convert the markdown file with custom margins of 1 inch on all sides and Letter format"

Mermaid Diagrams

# Process Flow

```mermaid
graph TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Action 1]
    B -->|No| D[Action 2]
    C --> E[End]
    D --> E

## 🛠️ Available Tools

### `convert_markdown_to_pdf`
Converts a markdown file to PDF.

**Parameters:**
- `markdownPath` (string): Path to the markdown file
- `outputPath` (string): Where to save the PDF
- `format` (optional): Page format (A4, A3, A5, Letter, Legal, Tabloid)
- `margin` (optional): Custom margins object

### `markdown_content_to_pdf`
Converts markdown content directly to PDF.

**Parameters:**
- `markdownContent` (string): Markdown content to convert
- `outputPath` (string): Where to save the PDF
- `title` (optional): Document title
- `format` (optional): Page format
- `margin` (optional): Custom margins object

## 🎨 Supported Markdown Features

- **Headers**: H1-H6 with modern styling
- **Text formatting**: Bold, italic, strikethrough
- **Lists**: Ordered and unordered with custom bullets
- **Tables**: Styled with alternating row colors
- **Code blocks**: Syntax highlighting for 100+ languages
- **Blockquotes**: Elegant left-border styling
- **Links**: Styled with hover effects
- **Images**: Embedded with proper scaling
- **Mermaid diagrams**: Flowcharts, sequence, gantt, and more

## 📋 Requirements

- Node.js 18+
- Chrome/Chromium (automatically installed with Puppeteer)

## 🔧 Configuration Examples

### Custom Margins
```json
{
  "margin": {
    "top": "1in",
    "right": "0.5in",
    "bottom": "1in",
    "left": "0.5in"
  }
}

Front Matter Support

---
title: My Document
author: John Doe
date: 2024-01-01
---

# Document Content
Your markdown content here...

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

🌟 Show Your Support

Give a ⭐️ if this project helped you!