
pdffr
io.github.AmerSarhan由 GitHub 账号 AmerSarhan 发布v0.1.1更新于 Oct 24, 2026
Local, private PDF to Markdown for agents: geometry-first parsing, OCR only where needed.
概览
本地 MCP 服务器,让 AI 助手把 PDF 转成 Markdown、提取大纲和表格,优先解析文字几何信息,仅在必要时使用本机 OCR。
- 可以做什么
- 从文件路径、URL 或 base64 字节把 PDF 转成 Markdown,可指定页码范围、是否 OCR、语言和字符上限,返回 Markdown 及一行统计信息。提取标题大纲,包含层级、文字和页码,便于助手先决定读哪些页。把每个表格提取为按页分组的 JSON 行数据。三个工具都接受相同的路径、URL 或 base64 输入。
- 适用场景
- 适合助手需要在本地阅读、总结或引用 PDF 报告、发票或扫描件时使用,尤其是不希望把文档上传到第三方服务,或需要结构化提取表格与大纲的场景。
- 运行要求
- 通过 npx 以本地 stdio 进程运行(包名 pdffr-mcp),需要 Node 20 或更高版本。首次运行会把所请求语言的 OCR 模型(默认英语)下载到操作系统临时目录。未声明 API 密钥、账户或环境变量。使用 URL 输入时需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 pdffr,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
pdffr-mcp
An MCP server that gives any agent — Claude Desktop, Claude Code, Cursor, Windsurf, Zed, your own — a local, private PDF → Markdown tool backed by pdffr. Born-digital pages decompile from glyph geometry in milliseconds; scans and screenshots get on-device OCR only where the text layer can't explain the ink. Nothing leaves the machine.
Install
Claude Desktop / Claude Code / Cursor / Windsurf — add to your MCP config:
Claude Code one-liner:
Requires Node 20+. The first run downloads the OCR model for the requested language (English by default) into the OS temp directory.
Tools
pdf_to_markdown
Decompile a PDF to Markdown. Give it one of path, url or base64.
Returns the Markdown, followed by a one-line stats footer (pages, time, OCR regions).
pdf_outline
Headings only — level, text and page — so an agent can decide which pages to read before paying for them. Same inputs (path / url / base64, ocr, lang).
pdf_tables
Every table as JSON rows ([{ page, rows: string[][] }]). Same inputs.
Why not a vision model
A PDF already knows where every glyph is. pdffr reads that geometry directly and reserves OCR for the pixels the text layer doesn't explain, so a 30-page report comes back in well under a second and a scanned invoice in a couple of seconds — with no API key and no upload. See the architecture notes.
MIT © Amer Sarhan
来源:packages/mcp/README.md,提交 642d495
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
