Repository navigation
What's New in v2.3.0
This release expands markdown2pdf-mcp into a multi-tool suite with batch processing, pre-flight linting, visual themes, custom styling, and performance optimizations.
π New Tools
batch_create_pdf: Convert multiple Markdown documents or local files in a single operation. Reuses a single Chromium browser session across the entire batch, dramatically accelerating multi-document conversion workloads. Supports asharedConfigblock with per-document overrides.validate_markdown: Fast, pure Node.js pre-flight linter (0ms browser overhead). Catches unsupported LaTeX math formulas, alerts about stripped HTML tags, validates Mermaid diagram headers/delimiters, checks image references againstM2P_ASSETS_DIR, and calculates document statistics (characters, lines, words, estimated pages).
π¨ Visual Themes & Custom Styling
- 5 Built-in Themes:
default: Modern system sans-serif typography (-apple-system,Segoe UI,Roboto).github: GitHub-flavored markdown with borders, zebra tables, and shaded code blocks.academic: Formal serif typography (Times New Roman), justified text, and paper layout.report: Executive report styling with corporate accents and callouts.minimal: Elegant minimalist layout with light typography and generous whitespace.
- Custom CSS (
customCss): Injects custom styles directly into the document. - Asymmetric Margins (
margin): Configure individual{ top, right, bottom, left }margins in addition to uniformpaperBorder. - Running Headers & Footers: Added
headerTextandfooterTextfor custom running titles and notices alongside page numbers and watermarks.
β‘ Performance & Usability
- Direct File Input (
inputPath): Convert local.mdfiles directly from disk in both single and batch tools without loading document contents into LLM context windows. - Browser Lifecycle Optimization: Shared browser instances for batch processing and clean tab recycling.
- MCP Protocol Alignment: Converted runtime generation errors into
{ isError: true, content: [...] }tool responses for autonomous LLM self-correction. - Process Memory Leak Fix: Cleaned up process signal handlers to eliminate EventEmitter listener leaks.
Upgrade
npx -y markdown2pdf-mcp@latestFull details in the CHANGELOG.
