
Pdf It
io.github.mrslbt由 GitHub 账号 mrslbt 发布v2.1.0更新于 Oct 27, 2026
Native PDF renderer for AI markdown. Cover, TOC, page-numbered footer. Fonts embedded, zero config.
概览
本地 MCP 服务器,把 Markdown 转成带封面、目录和页码页脚的排版 PDF。
- 可以做什么
- 把 Markdown 内容转换为 PDF,可指定标题、作者和输出路径
- 列出可用模板(research-report 或 plain)
- 生成封面、根据 H1/H2 标题自动生成目录,以及带标题和页码的页脚
- 渲染代码块、表格、列表和图表,使用内置字体,并把文件写到指定位置
- 适用场景
- 适合在会话产出较长的 Markdown 报告、摘要或设计文档时,把它变成可直接发给客户或同事的正式 PDF,而无需手工做 HTML 或 Pandoc 转换。
- 运行要求
- 以 npm 包 pdf-it-mcp 通过 stdio 在本地运行,可全局安装或用 npx 按需运行。需要 Node.js 20 或更高版本;渲染器和字体随包提供,无需其他安装或配置。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Pdf It,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
pdf-it
[pdf-it MCP server] [MCP Badge] [npm version] [npm downloads] [License: MIT]
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.
Fonts ship inside the package, so every PDF looks the same on every machine. Nothing to install, nothing to configure.
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 actually want to read.
Chrome print: takes 30 seconds, output looks like a Word doc. Manual HTML conversion: 10 minutes per document. Pandoc: works but defaults look like a 2008 academic paper. None of it produces an artifact you would send to a client.
pdf-it is one command. The output is designed by default.
Install
Or run on demand with npx pdf-it-mcp.
Requirements
- Node.js 20 or newer
- Nothing else to install. The renderer and fonts ship inside the package.
Configure
Claude Desktop
Edit claude_desktop_config.json:
Claude Code
Cursor
Add to ~/.cursor/mcp.json with the same shape as Claude Desktop.
Cline / Continue / Zed / Goose
Standard MCP config. Same npx -y pdf-it-mcp command.
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
generate_pdf parameters
Templates
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.
Output
By default PDFs are written to ~/Documents/pdf-it/{slug}-{timestamp}.pdf. Pass output_path to override.
Design
Three families ship inside the package:
- Newsreader for the cover title (display 60, light) and body H1 (display 32). High-contrast serif that holds editorial weight at large sizes.
- DM Sans for H2, H3, table type, and the TOC heading. Quieter sub-hierarchy.
- JetBrains Mono for page numbers, metadata, code, and figure captions.
Pure white paper, near-black ink (#111113), secondary ink for date and table cells (#2B2B2E), muted gray for page numbers and date (#7A7A7E), hairline borders (#E6E6E6). No accent colors. Code blocks render without syntax highlighting on purpose: color choices in PDFs age badly.
Every value lives in src/templates/design-tokens.ts as the single source of truth. If you want a different design language, fork the components. They live in src/templates/components/ and are plain React-PDF components with a small surface area.
How it works
- Parse: remark converts your markdown into an AST.
- Compose: the AST becomes typed React components (Cover, TOC, and body primitives like H1/H2/H3, Paragraph, CodeBlock, Blockquote, Table, lists, and charts).
- Render:
@react-pdf/rendererrasterizes the React tree into a deterministic PDF with embedded fonts and TOC anchors. - Output: the PDF lands in
~/Documents/pdf-it/{slug}-{timestamp}.pdfwith title/author metadata embedded.
Total time: typically sub-second for a 5-page document, 1-2 seconds for a 30-page document.
Recognition
Listed on npm, Glama, and LobeHub.
Disclaimer
This is an unofficial, community-built tool. It is not affiliated with, endorsed by, or sponsored by Anthropic PBC. Claude and Claude Code are trademarks of Anthropic PBC.
pdf-it runs locally and ships its own renderer (@react-pdf/renderer) and fonts. Use at your own risk. The author accepts no liability for issues arising from misuse, prompt injection, bugs, or rendering failures.
License
MIT. See LICENSE.
来源:README.md,提交 1d9eb43
工具
0版本历史
1- v2.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分