PDF Generator MCP Server

PDF Generator MCP Server

pdf-mcp-server-fabiangenell•byfabiangenell

An MCP server that generates professional PDFs from markdown content with custom themes, image embedding, templates, and styling options.

License: ISC•Runtime: Awaiting documentation review•Category: productivity work

WHAT IT DOES

  • •Generates PDFs from markdown content with configurable page settings, themes, table of contents, and page numbers.
  • •Embeds images from local paths, remote URLs, or base64 data URLs, with automatic optimization and caching.
  • •Supports saving and reusing custom styles that combine formatting preferences, CSS, and writing prompts.
  • •Includes multiple built-in themes (Default, Professional, Minimal, Dark) and a template system.

BEST FOR

  • •Creating business or corporate reports with professional styling and images.
  • •Producing technical documentation with a minimal, distraction-free design and table of contents.
  • •Generating presentation-style or academic documents from markdown using pre-built custom styles.

ABOUT PDF-MCP-SERVER-FABIANGENELL

PDF Generator MCP Server is cataloged as an MCP server attributed to fabiangenell. An MCP server that generates professional PDFs from markdown content with custom themes, image embedding, templates, and styling options. It is categorized under productivity work. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: ISC. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for PDF Generator MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Where are generated PDFs saved by default?

PDFs are saved to the user's Downloads folder by default unless an absolute path is provided.

What image sources can be embedded in a PDF?

Images can come from local file paths, remote URLs, or base64 data URLs.

Upstream README

View this exact version on GitHub

README.md · 9059964190d4 · Fetched 2026-11-13 12:24:22 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

PDF Generator MCP Server

A powerful MCP (Model Context Protocol) server for generating professional PDFs from markdown content with custom styling, image support, and various formatting options.

Features

  • 🎨 Multiple Built-in Themes: Default, Professional, Minimal, and Dark themes
  • 📸 Smart Image Handling: Automatic optimization, caching, and embedding
  • 📄 Advanced PDF Options: Headers, footers, page numbers, TOC generation
  • 🎯 Template System: Create and reuse custom templates
  • ✅ Markdown Validation: Check content before generation
  • 🚀 Performance Optimized: Browser instance reuse, image caching
  • 💼 Custom Styles: Save and reuse custom PDF styles with prompts and formatting

Installation

No installation required! Add directly to your Claude desktop configuration:

{
  "mcpServers": {
    "pdf-generator": {
      "command": "npx",
      "args": ["github:FabianGenell/pdf-mcp-server"]
    }
  }
}

That's it! The server will be downloaded and run automatically.

Alternative: Local Development

# Clone the repository
git clone https://github.com/FabianGenell/pdf-mcp-server
cd pdf-mcp-server
npm install

# Add to Claude desktop configuration
{
  "mcpServers": {
    "pdf-generator": {
      "command": "node",
      "args": ["/path/to/pdf-mcp-server/src/index.js"]
    }
  }
}

Available Tools

1. generate_pdf

Generate a PDF from markdown content. PDFs are saved to your Downloads folder by default.

await generate_pdf({
  content: "# My Document\n\nThis is **markdown** content.",
  output_path: "output.pdf",  // Saves to ~/Downloads/output.pdf
  options: {
    theme: "professional",
    include_toc: true,
    page_numbers: true
  }
});

Note: If you provide just a filename or relative path, the PDF will be saved to your Downloads folder. Use an absolute path to save elsewhere.

2. embed_images

Process and embed images in markdown with optimization. Supports local paths, URLs, and base64 data URLs.

Image Source Types

Local Files (from your computer):

await embed_images({
  markdown_content: "# Report\n\n[IMAGE_1]\n\nSome text here.",
  image_sources: [{
    placeholder: "[IMAGE_1]",
    source: "/Users/username/Pictures/screenshot.png",  // Absolute path
    caption: "Application Screenshot",
    alignment: "center"
  }]
});

Remote URLs:

await embed_images({
  markdown_content: "# Report\n\n[LOGO]\n\nCompany overview.",
  image_sources: [{
    placeholder: "[LOGO]",
    source: "https://example.com/images/logo.png",  // Remote URL
    caption: "Company Logo",
    alignment: "center"
  }]
});

Base64 Data URLs:

await embed_images({
  markdown_content: "# Report\n\n[CHART]\n\nData analysis.",
  image_sources: [{
    placeholder: "[CHART]",
    source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",  // Base64 data URL
    caption: "Generated Chart",
    alignment: "center"
  }]
});

AI Agent Guidelines

For AI agents, you can provide images in three ways:

  1. Local Computer Paths: Use absolute paths like /Users/username/Documents/image.png or C:\Users\username\Documents\image.png
  2. Online Images: Use direct URLs like https://example.com/image.png
  3. Generated/Uploaded Images: Use base64 data URLs starting with data:image/[type];base64,[data]

All image types are automatically optimized, cached, and sized appropriately for PDF performance. Images are automatically limited to 70% of page height to ensure proper layout.

3. create_styled_template

Create reusable templates for consistent styling.

await create_styled_template({
  template_name: "company-report",
  css_content: "/* Custom CSS */",
  html_template: "<!-- Optional HTML structure -->"
});

4. validate_markdown

Validate markdown before PDF generation.

await validate_markdown({
  content: "# Document\n\n...",
  check_images: true,
  check_links: true
});

5. create_custom_style

Create a custom PDF style with formatting preferences and writing prompts.

await create_custom_style({
  style_name: "annual_report",
  description: "Professional annual report style",
  prompt: "Format as an annual report with executive summary, metrics, and professional tone",
  theme: "professional",
  custom_css: "/* Additional styling */",
  format: "A4",
  include_toc: true,
  page_numbers: true
});

6. generate_pdf_with_style

Generate a PDF using a saved custom style. PDFs are saved to your Downloads folder by default.

await generate_pdf_with_style({
  style_name: "annual_report",
  content: "# Annual Report 2024\n\n...",
  output_path: "annual_report_2024.pdf"  // Saves to ~/Downloads/annual_report_2024.pdf
});

7. list_custom_styles

List all available custom styles.

const { styles } = await list_custom_styles();
// Returns array of style summaries with names, descriptions, and themes

Themes

Default

Clean and readable typography perfect for general documentation.

Professional

Corporate styling with letterhead design, ideal for business reports.

Minimal

Distraction-free design with generous whitespace for technical docs.

Dark

High-contrast theme optimized for presentations and screen viewing.

Custom Styles

The PDF server now supports saving custom styles that combine formatting preferences, CSS styling, and writing prompts. This allows you to create consistent document types like annual reports, technical documentation, or newsletters.

Pre-built Custom Styles

The server includes several example styles:

  • annual_report: Professional annual report with executive formatting
  • technical_documentation: Clean technical docs with code highlighting
  • presentation_slides: Slide-style formatting for presentations
  • research_paper: Academic paper formatting
  • newsletter: Modern newsletter with columns

Creating Custom Styles

Custom styles can include:

  • Writing prompts: Instructions for how content should be formatted
  • Theme selection: Base theme to build upon
  • Custom CSS: Additional styling rules
  • Page settings: Format, orientation, margins
  • Features: TOC, page numbers, headers/footers

Example:

await create_custom_style({
  style_name: "project_proposal",
  description: "Professional project proposal format",
  prompt: "Format as a project proposal with objectives, timeline, budget sections",
  theme: "professional",
  custom_css: ".budget-table { ... }",
  format: "Letter",
  include_toc: true,
  page_numbers: true,
  header: "<div>Project Proposal</div>"
});

Custom Styling

Use CSS classes in your markdown with markdown-it-attrs:

# Title {.center}

This is an info box {.info-box}

![Image](path.jpg){.img-shadow .img-rounded}

Available CSS classes:

  • .page-break - Force page break
  • .no-break - Prevent page break
  • .center, .right - Text alignment
  • .info-box, .warning-box, .error-box, .success-box - Callout boxes
  • .img-shadow, .img-rounded, .img-border - Image styling

PDF Options

{
  // Page settings
  format: 'A4',              // A4, Letter, Legal, etc.
  orientation: 'portrait',   // portrait or landscape
  margin: {
    top: '1in',
    right: '1in',
    bottom: '1in',
    left: '1in'
  },
  
  // Styling
  theme: 'professional',     // Theme name
  custom_css: '...',        // Additional CSS
  
  // Content
  include_toc: true,        // Table of contents
  toc_depth: 3,            // TOC heading depth
  page_numbers: true,       // Show page numbers
  
  // Images
  image_quality: 85,        // JPEG quality
  max_image_width: 800,     // Max width in pixels
  
  // Advanced
  wait_for_network: true,   // Wait for images
  print_background: true    // Include backgrounds
}

Example Usage

Professional Report

// First, embed images (supports local files, URLs, and base64)
const { processed_markdown } = await embed_images({
  markdown_content: reportContent,
  image_sources: [
    {
      placeholder: '[HERO_IMAGE]',
      source: '/Users/username/Downloads/hero.png',  // Local file
      alignment: 'full-width'
    },
    {
      placeholder: '[LOGO]',
      source: 'https://company.com/logo.png',  // Remote URL
      alignment: 'center'
    },
    {
      placeholder: '[CHART]',
      source: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...',  // Base64
      caption: 'Sales Data',
      alignment: 'center'
    }
  ],
  options: {
    auto_optimize: true,
    quality: 90
  }
});

// Then generate PDF
await generate_pdf({
  content: processed_markdown,
  output_path: 'report.pdf',  // Saves to Downloads
  options: {
    theme: 'professional',
    include_toc: true,
    page_numbers: true,
    header: '<div style="text-align: right">Q4 2024 Report</div>',
    footer: '<div style="text-align: center">Confidential</div>'
  }
});

Technical Documentation

await generate_pdf({
  content: technicalDocs,
  output_path: 'docs.pdf',  // Saves to Downloads
  options: {
    theme: 'minimal',
    include_toc: true,
    toc_depth: 4,
    enable_javascript: false
  }
});

File Structure

pdf-mcp-server/
├── src/
│   ├── index.js              # MCP server entry point
│   ├── pdf-generator.js      # Core PDF generation
│   ├── markdown-processor.js # Markdown processing
│   ├── image-processor.js    # Image optimization
│   ├── template-manager.js   # Template system
│   └── themes/              # Built-in themes
├── templates/               # User templates
├── temp/                   # Temporary files
└── docs/                   # Documentation

Requirements

  • Node.js 18+
  • Playwright browsers (auto-installed)

License

ISC

Contributing

Pull requests are welcome! Please read the contributing guidelines first.

Support

For issues and feature requests, please use the GitHub issue tracker.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for PDF Generator MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/pdf-mcp-server-fabiangenell)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related productivity work MCP Servers

Alternative and complementary servers in the same category

View all in productivity work →
Tuqui hosted MCP server for Odoo
tuqui-odoo-mcp-for-claude-chatgpt•tuqui-ai

Tuqui is a hosted MCP server that connects Odoo with Claude and ChatGPT so users can ask about sales, stock, customers and overdue invoices in plain language.

Repository stats unavailable
Productivity & Ops