pdf-it
Turn markdown into designed PDFs with cover page, table of contents, and code blocks that hold across pages. One command from Claude Desktop, Claude Code, Cursor, Cline, Zed, or any MCP-capable client.
README
pdf-it
A Model Context Protocol (MCP) server and Claude Code skill that turns markdown into PDFs that look like they were made on purpose. Cover page, table of contents, code blocks that hold across page breaks, page-numbered footer. One command from your Claude session to a file you can send to a client.

Why this exists
Every Claude Code research session ends the same way: a wall of useful markdown and no clean way to turn it into a PDF a person would want to read. Chrome print is ugly. Manual HTML conversion is friction.
pdf-it does the work. Markdown in, designed PDF out. One command.

A 12-page sample is in examples/designing-ai-agent-uiux.pdf.
Works with
pdf-it is a standard Model Context Protocol server. Any client that supports MCP locally can use it.
| Client | Supported | How to add |
|---|---|---|
| Claude Desktop (Mac, Windows) | yes | Edit claude_desktop_config.json |
| Claude Code (CLI) | yes, plus skill triggers like "save this as PDF" | claude mcp add pdf-it -- npx -y pdf-it-mcp |
| Cursor | yes | Edit ~/.cursor/mcp.json |
| Cline (VS Code extension) | yes | Edit Cline's MCP settings |
| Continue.dev | yes | Add via Continue's MCP config |
| Zed | yes | Standard MCP config |
| Goose (Block's CLI) | yes | Standard MCP config |
| Custom agents via the Anthropic SDK | yes | Wire MCP yourself |
| claude.ai (browser) | no | Web does not run local MCP servers |
| Claude iOS / Android | no | Mobile does not run local MCP servers |
Hard requirements on any client: Node.js 18 or newer, Google Chrome installed, the client must support MCP.
Install
npm install -g pdf-it-mcp
Or run on demand with npx pdf-it-mcp.
Requirements
- Node.js 18 or newer
- Google Chrome installed (used as the renderer, no extra download)
Configure
Claude Desktop
Edit claude_desktop_config.json:
{
"mcpServers": {
"pdf-it": {
"command": "npx",
"args": ["-y", "pdf-it-mcp"]
}
}
}
Claude Code
claude mcp add pdf-it -- npx -y pdf-it-mcp
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"pdf-it": {
"command": "npx",
"args": ["-y", "pdf-it-mcp"]
}
}
}
Custom Chrome path
If Chrome lives somewhere non-standard:
{
"mcpServers": {
"pdf-it": {
"command": "npx",
"args": ["-y", "pdf-it-mcp"],
"env": { "CHROME_PATH": "/path/to/chrome" }
}
}
}
Use
In any Claude session connected to the server, ask:
Save this as a PDF
Or any of these phrasings: export as PDF, make a PDF report from this, turn this into a PDF, /pdf. The skill picks up the request and routes it through pdf-it. The output lands in ~/Documents/pdf-it/ by default.
Tools
| Tool | Description |
|---|---|
generate_pdf |
Convert markdown into a PDF. Accepts a template (research-report or plain), optional title and author for the cover, and an optional output path. |
list_templates |
Return the list of available templates with descriptions. |
generate_pdf parameters
| Parameter | Required | Description |
|---|---|---|
content |
yes | Markdown string to convert |
title |
no | Shown on the cover and in the page footer |
author |
no | Shown on the cover |
output_path |
no | Absolute path for the output. Defaults to ~/Documents/pdf-it/{slug}-{timestamp}.pdf |
template |
no | research-report (default) or plain |
Templates
| Name | Description |
|---|---|
research-report |
Cover page with title, author, and date. Auto-generated table of contents from H1 and H2 headings. Body with proper hierarchy. Footer with title and page number. Best for research, summaries, design docs, reports. |
plain |
No cover, no TOC. Dense body content only. Best for short notes and quick exports. |
Skill
This package ships with a Claude Code skill at SKILL.md. Trigger phrases the skill responds to:
save this as PDFexport as PDFmake a PDF report from thisturn this into a PDFgenerate a PDF/pdf
See SKILL.md for the full skill spec.
Examples
The examples folder has a sample generated PDF (designing-ai-agent-uiux.pdf, 12 pages) and the cover and body screenshots used in this README.
Output
By default PDFs are written to ~/Documents/pdf-it/{slug}-{timestamp}.pdf. Pass output_path to override.
Design
System fonts where possible. Inter for body and headings, JetBrains Mono for code, page numbers, and metadata. Pure white paper, near-black ink, neutral hairline borders, no accent colors. Code blocks render without syntax highlighting on purpose: color choices in PDFs age badly.
If you want a different design language, fork the templates and adjust. They live in src/templates/ and are plain HTML and CSS rendered through Puppeteer.
License
MIT. See LICENSE.
Built by Marsel Bait.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。