plan-export-mcp
This MCP server lets AI agents create visual exports of Markdown-based plans and Mermaid diagrams as styled files. It provides two tools:
export_plan— Converts a Markdown file (or raw Markdown string) into a styled HTML, PNG, or PDF document using GitHub-like light/dark themes. Supports high-resolution PNG rendering, code highlighting, callouts, and safe handling of local links, with configurable output directory and filename.render_diagram— Renders a raw Mermaid diagram definition into a cropped PNG or SVG file, with optional base64 image data embedded in the response for direct chat preview.
Both tools can be invoked by an MCP client (e.g., Claude Desktop, Cursor) or used as a standalone CLI, and accept parameters for theme (dark/light), output format(s), output directory, and filename.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@plan-export-mcp Export docs/plan.md as dark mode PNG and PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
plan-export-mcp
The visual export engine for coding agents. Turn Markdown plans and Mermaid diagrams into beautiful, shareable documents.
The Problem
When coding agents (Cursor, Claude Code, Pi, Windsurf, Aider) draft implementation plans or audit codebases, they generate rich Markdown with code diffs, Mermaid architecture diagrams, GitHub callouts, and task lists.
Inside your IDE: It looks crisp and structured.
When sharing: Sending raw
.mdon WhatsApp, Slack, or Email turns into an unreadable mess. Generic PDF converters output 1990s-style plain black-and-white academic papers, break Mermaid diagrams, and strip dark themes.
plan-export-mcp bridges this gap. It gives your AI agent a native MCP tool to export plans with pixel-perfect visual fidelity.
Related MCP server: Markdown to PDF MCP Server
Key Features
High-Res PNG (Long Screenshot): Rendered at 2x Retina DPR. Ideal for WhatsApp and Slack because it renders inline in chat feeds without forcing teammates to download a PDF reader.
VS Code Code Highlighting: Powered by Shiki with language badges and diff support (
+/-lines).GitHub Callouts & Alerts: Native support for
> [!NOTE],> [!WARNING],> [!TIP],> [!IMPORTANT], and> [!CAUTION].Technical Typography: Visible Markdown prose uses Unicode arrows, comparisons, plus/minus, and ellipses while code, autolinks, HTML, and Mermaid stay unchanged.
Private Artifact References:
file://,vscode://,cursor://, andwindsurf://links render only their labels as inline code, without exposing local paths.Mermaid Architecture Diagrams: Client-side vector rendering directly embedded as SVG.
Clean A4 PDF: Print-optimized with background colors and screen contrast preserved.
Standalone HTML: Embedded styles; Mermaid diagrams load a pinned CDN script, and HTTPS images remain external. Fully offline viewing requires no Mermaid diagrams or external images.
Dual Mode: Use it as an MCP server for AI agents or as a standalone CLI tool.
Installation and Usage
Prerequisites
Node.js 20+
npm, pnpm, or yarn
(Note: HTML exports run in pure Node.js with zero browser dependencies. For PDF/PNG rendering, Puppeteer manages a lightweight headless browser automatically or uses system Chromium if present).
1. Run with NPX (Recommended)
Runs on-demand without any global installation.
Claude Code (One-liner CLI)
claude mcp add plan-export npx -y @agmonetti/plan-export-mcpClaude Desktop & Cursor (JSON Configuration)
Add to your claude_desktop_config.json or .cursor/mcp.json:
{
"mcpServers": {
"plan-export": {
"command": "npx",
"args": ["-y", "@agmonetti/plan-export-mcp"]
}
}
}Tip (Linux/Docker): If Puppeteer cannot locate Chrome automatically, specify its path explicitly:
"env": { "PUPPETEER_EXECUTABLE_PATH": "/usr/bin/google-chrome-stable" }
2. Install Globally from NPM
Ideal for instant startup without network latency on every invocation:
npm install -g @agmonetti/plan-export-mcp{
"mcpServers": {
"plan-export": {
"command": "plan-export-mcp"
}
}
}3. Install from Source (Development)
Clone the repository and build locally:
git clone https://github.com/agmonetti/plan-export-mcp.git
cd plan-export-mcp
npm install
npm run build{
"mcpServers": {
"plan-export": {
"command": "node",
"args": ["/path/to/plan-export-mcp/dist/index.js"]
}
}
}Standalone CLI Usage
You can also run it directly in your terminal:
# Export to PNG and PDF in dark mode
npx @agmonetti/plan-export-mcp docs/plan.md --theme dark
# Export to all formats in light mode
npx @agmonetti/plan-export-mcp docs/plan.md --theme light --formats png,pdf,html --output-dir exports/MCP Tool Reference: export_plan
Your AI agent can invoke this tool directly:
{
"input": "docs/plans/feature-auth.md", // or raw markdown string
"theme": "dark", // "dark" | "light" (default: "light")
"formats": ["png", "pdf"], // ["png", "pdf", "html"]
"outputDir": "./exports", // default: "./exports"
"outputName": "auth-plan" // default: derived from file
}Remote images are format-dependent: standalone HTML may load HTTPS images from the viewer's network, while PNG/PDF browser rendering blocks external images. The browser permits the pinned Mermaid CDN script as a fallback if the bundled script is unavailable. Use embedded data: images for portable exports; local file URLs are not loaded.
Input files may be reached through symlinks to permitted targets. Path validation assumes a trusted local filesystem: it does not protect against another local process replacing files or directory entries concurrently between path resolution and opening. Do not accept input paths in directories an untrusted local user can modify.
Architecture
Runtime: Node.js (>= 20) + TypeScript
MCP SDK:
@modelcontextprotocol/sdk(stdio transport)Highlighter: Shiki (VS Code TextMate engine)
Diagrams: Mermaid.js
Headless Engine: Puppeteer with intelligent fallback to system Chrome/Chromium.
License
MIT © 2025
Available Tools
2 toolsexport_planA
Export an AI agent implementation plan or audit (Markdown) to styled PDF, high-res PNG, or self-contained HTML matching IDE aesthetics.
Inputs: input (required), theme, formats, outputDir, +1 more.
render_diagramA
Render an isolated Mermaid diagram (sequence, flowchart, class, architecture, ER) directly to a cropped PNG or SVG file with optional visual preview in chat.
Inputs: diagram (required), theme, format, outputDir, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools target different output types and inputs: one exports whole Markdown plans/audits, the other renders isolated Mermaid diagrams. There is mild potential for confusion when a plan includes diagrams, but the descriptions make the boundary clear.
Both tools follow the same verb_noun pattern: export_plan and render_diagram. The naming is parallel, predictable, and accurately reflects each tool's function.
With only two tools, the server feels thin but is still reasonably scoped for a narrow plan-export and diagram-rendering purpose. It is not bloated, yet it sits at the lower boundary of acceptable tool count.
The core workflows are covered: exporting plans to common document formats and rendering diagrams to image formats. Minor gaps exist, such as batch processing or combining plan text and diagrams into a single export, but agents can accomplish the primary tasks without dead ends.
Maintenance
Related MCP Connectors
Generate images, GIFs, videos, and PDFs from HTML, URLs, or templates — from your AI agent.
Give your agent eyes: screenshots of any web page it can see, pages as markdown, and PDFs.
Agent tools: clean web screenshots/PDFs, PDF & image OCR to Markdown, PageSpeed audits, email checks
Screenshot, PDF and Open Graph image API for AI agents: capture pages, render PDFs, make OG images.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to generate professional Word and PDF documents with support for Markdown, syntax highlighting, and smart pagination. It features automatic JSON detection and responsive A4 formatting for creating high-quality technical reports and manuals.2207 npm10MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to convert Markdown files and content to beautifully formatted PDF documents using Playwright's Chromium engine.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to generate stylized images from text and code, with syntax highlighting and markdown formatting support.MIT
- AlicenseNot gradedqualityCmaintenanceEnables generating images, animations, PDFs, charts, and code-highlight SVGs from HTML/JSX templates and code, writing files atomically and returning paths, MIME types, and byte counts without embedding binary media in the agent context.5 npmMIT