MCP server from FabianGenell/pdf-mcp-server
claude mcp add --transport stdio fabiangenell-pdf-mcp-server npx github:FabianGenell/pdf-mcp-server
How to use
This MCP server provides a dedicated PDF generation service that converts Markdown content into feature-rich PDFs with theming, image handling, and templates. Core capabilities include generating PDFs from Markdown via generate_pdf, embedding and optimizing images through embed_images, and managing reusable styles and templates with create_styled_template, create_custom_style, and list_custom_styles. You can validate content before rendering with validate_markdown and produce styled PDFs using pre-defined themes (Default, Professional, Minimal, Dark) or custom CSS via custom_style. Typical workflows include validating markdown, embedding images from local/remote/base64 sources, applying a chosen theme, and optionally generating a table of contents and page numbers. The server supports saving outputs to the user’s Downloads folder by default, and you can reuse saved styles for consistent document formatting across projects.
How to install
Prerequisites:
- Node.js and npm (recommended latest LTS)
- Basic familiarity with JSON-based configuration for Claude or your MCP manager
Installation options:
- Quick Start (no local install required)
- Add to Claude/host configuration using npx:
{
"mcpServers": {
"pdf-generator": {
"command": "npx",
"args": ["github:FabianGenell/pdf-mcp-server"]
}
}
}
This pulls the server directly from GitHub and runs it on demand.
- Local development (clone and run locally)
- Clone the repository and install dependencies:
git clone https://github.com/FabianGenell/pdf-mcp-server
cd pdf-mcp-server
npm install
- Run or integrate locally by pointing Claude to your local entry point (example shows index.js):
{
"mcpServers": {
"pdf-generator": {
"command": "node",
"args": ["/path/to/pdf-mcp-server/src/index.js"]
}
}
}
- Environment and usage tips
- Ensure the server has access to your filesystem for reading markdown/images and writing PDFs.
- When running locally, you can customize themes, templates, and styles via the provided APIs after starting the server.
Additional notes
Tips & troubleshooting:
- PDFs by default are saved to the user’s Downloads folder unless you supply an absolute output_path in the tool options.
- Images are automatically optimized, cached, and sized for performance. Ensure image sources (local paths, URLs, or base64 data URLs) are accessible to the server.
- If embedding images or applying custom styles, verify that the CSS selectors and class names align with the markdown-it-attrs usage described in the docs (e.g., .center, .info-box).
- When using generate_pdf or generate_pdf_with_style, you can override the default output path by providing output_path in the options.
- For production deployments, consider configuring environment variables for caches, image proxies, or theme defaults if the MCP environment supports env injection.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.