
Pdfs
io.github.theluckystrike由 GitHub 账号 theluckystrike 发布v0.22.5更新于 Oct 24, 2026
Merge, split, extract, rotate, reorder and stamp PDFs from your AI chat.
发布方自己的服务:pdfs.build
概览
一个本地 MCP 服务器,让助手在你自己的电脑上合并、拆分、提取、旋转、重排、盖章并读取 PDF 文件的文本。
- 可以做什么
- 检查与统计 PDF:页面尺寸、纸张名称、旋转、元数据、是否加密,以及多个文件的页数合计,无法读取的文件单独报告。合并与拆分:按给定顺序合并 PDF,按页码范围拆分,把选定页面提取或重排为新文件。调整页面:按 90 度的倍数旋转,并用预设或自定义文字盖章,可设颜色、位置、透明度和字号。读取内容:尽力从页面内容流提取文本,并输出 AcroForm 表单字段值。商务页脚:把已保存的公司名称和增值税号写入每页页脚。授权与历史:查看或激活 Pro 密钥,并查看最近 25 次操作。
- 适用场景
- 适合处理发票、合同、扫描件或报告,希望从对话中完成常规的页面级 PDF 操作,而不必使用网页上传工具,尤其适用于不愿上传到第三方网站的文档。
- 运行要求
- 作为本地进程在用户电脑上运行(仅桌面端),需要 Node.js 18 或更高版本。npm 包据说明尚未发布,可用一键 .mcpb 安装包或克隆源码自行构建。可选的 Pro 许可证密钥通过 MCP_LICENSE_KEY 环境变量提供,或调用 license_activate 激活。商务页脚读取由配套服务器写入的共享商务资料。
安装
在 SourceWeft 中
- 打开 控制台中的 Pdfs,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Merge, split and fill PDF forms from Claude
Say "stamp PAID on that invoice and save a copy" or "pull pages 2 to 6 out of this scan and merge them with the contract" and it happens, on your machine, in a second. This MCP server does the small PDF jobs that otherwise send you to a web uploader: merge, split by page range, extract or reorder pages, rotate a sideways scan, stamp PAID or DRAFT or any text you like, put your business name and VAT id in the footer, count pages across a folder of files, and read a PDF's text back as text. No upload, no account, no native dependency, no office install.
In the official MCP Registry (io.github.theluckystrike/pdf-merge-split-stamp-extract-pages).
Listed on the AI Product Index - live remote endpoint at mcp.zovo.one/s/pdf, free tier, no signup.
The PDF chores of a freelance business, done from chat instead of from a browser tab you do not trust with an invoice.
60-second install
npm publish for @theluckystrike/mcp-pdf is pending. Until then, the .mcpb one-click bundle or a clone+build
is the working path, both are verified below.
One-click (.mcpb): download pdf.mcpb from the latest release and double-click it in Claude Desktop:
https://github.com/theluckystrike/mcp-servers/releases/latest
(claude_desktop_config.json):
Claude Code:
(.cursor/mcp.json):
The npx form above starts working the moment the package is published. Until then, use the .mcpb bundle above, or
build from source with exactly these three commands:
Then point your client's command at node with one arg: the absolute path to servers/pdf/dist/index.js.
To run in Pro mode set MCP_LICENSE_KEY in the same config block, or call license_activate once with your key.
Tools
Resource: pdf://recent returns the last 25 operations, newest first, with the inputs, the files written and when.
Prompt: mark_invoice_paid chains mcp-invoice's invoice_get into pdf_stamp PAID and saves the stamped copy beside the original.
What you can say
Worked example
The stamp is drawn text, not a flattened image: it can be selected and searched, it is drawn on the 45-degree diagonal in the preset green, and the original file is byte-for-byte unchanged.
Free vs Pro
A tier limit is an answer, not an error, and nothing is written when one refuses a call.
Pro is a one-time $19, or $39 for every server in the collection, lifetime.
pdf_text is best effort, and here is exactly what that means
A PDF does not store text. It stores drawing operators, and the text you see is bytes handed to a font. This server
decompresses each page's FlateDecode content stream with node:zlib and reads the four text-showing operators --
Tj, TJ, ' and ", plus the positioning operators that end a line. That is a parser written here, in about
two hundred lines, with no pdfjs and no native module, and it has three real limits the tool states in its own
answer every time:
- A scan has no text. An image-only page carries no text operators, so nothing comes back. There is no OCR here and there will not be one; the answer says the page is probably a scan rather than returning an empty string with no explanation.
- A custom or CID encoding returns glyph indices, not letters. Subset-embedded and CJK fonts map bytes to glyph numbers through a table this parser does not read. When the output has no readable characters, the answer says the font is the reason.
- Reading order is drawing order. There is no column detection and no layout reconstruction. Word spaces are
recovered from the large negative kerns a
TJarray uses for them, so a PDF that positions every word separately can come back with words run together.
PDFs written by word processors, invoicing tools and report generators, everything with a standard or fully embedded font, read back cleanly. Anything else tells you why it did not.
Encrypted PDFs are refused, not guessed
pdf-lib cannot decrypt, and loading an encrypted file while ignoring the encryption produces pages of garbage that
would be written straight into the output. So a file whose trailer names an /Encrypt dictionary is refused by every
tool that writes, with the reason and the fix in the message: open it in a reader with the password, export or print
to a new PDF, and use that file. pdf_info still answers, with encrypted: true, because reporting is its whole job,
and pdf_count reports it as one unreadable file while still counting the rest.
Existing files are never overwritten, and inputs are never modified
Every tool writes a new file and leaves its inputs byte-for-byte alone, there is no in-place mode, on purpose.
An out_path that already exists is refused:
The path is reserved with an exclusive create, not an existence check, so two processes writing the same out_path
at the same time cannot clobber each other: one wins, the other is refused and writes nothing. pdf_split reserves
every one of its output paths before it writes any of them, so a collision on part 3 does not leave parts 1 and 2
behind as a half-done split, and the reservations are released, so nothing empty is left on disk either.
Pass overwrite: true when replacing the file is what you want.
overwrite: true still does not let an output be an input. Writing the result of an operation back over one of its
own sources destroys that source, the pages are already in memory and get written over the file they came from,
which takes a three-page file to the one page you extracted, and every later read of that path is then quietly
wrong. So an out_path that resolves to (or shares an inode with) any input of the same call is refused before any
work happens:
Limits
- Inputs over 100 MB are refused: rewriting a PDF needs several times its size in memory.
- A file that does not start with
%PDF-is refused before anything is read. - Rotation is recorded as page metadata, in multiples of 90 degrees, which is all the format has. Nothing is redrawn.
- Stamp text goes through a built-in PDF font, which carries WinAnsi and its 256 code points. A character outside it
is transliterated where it has an obvious Latin body, Polish
OPŁACONEstamps asOPLACONE, and the answer says so and prints what was actually drawn, and removed and counted where it does not, so there is no CJK stamp. A newline is a word separator, never a deletion. font_sizemust be between 1 and 1600 points. A stamp too long to fit even at the smallest size this server will use is still drawn, and the answer says how far past the edge it runs, so you can shorten it.pdf_textcaps one answer at 200,000 characters and names thepagesargument that continues from where it stopped. Nothing is missing from the file; the cut is in the answer, not the read.- No page numbering, no signatures, no redaction, no compression. This server does the page-level jobs; it is not a
PDF editor. It does not write PDF/A:
pdf_inforeports a file's ownpdfa_claim, and every tool that writes says plainly that its output no longer holds that claim. - Forms are read, not filled:
pdf_textprints the AcroForm field values, which live in the fields rather than in the page content stream and are therefore not part of the page text. - No OCR. See the
pdf_textsection.
How it stores data
Only a register of what it did: ${XDG_DATA_HOME:-~/.local/share}/mcp-servers/pdf/operations.json, the last 500
operations, as plain JSON. Your PDFs stay where you put them. Every write to the register runs inside an advisory
lock on .../pdf/.lock, so two clients on one data directory cannot lose a record, and saves go to a temporary file
and are renamed into place.
If the register is unreadable or not valid JSON it is never treated as "empty": it is moved aside byte-for-byte as
operations.json.corrupt-<timestamp> with a marker beside it. The PDF you asked for is still written, the file is
on disk before the register is touched, and the answer tells you the history could not be updated.
The business footer reads the one shared profile the whole suite uses,
${XDG_DATA_HOME:-~/.local/share}/mcp-servers/profile/business.json, written by business_set in mcp-invoice or
mcp-docx. Nothing is invented: with no name stored, pdf_watermark_business refuses and says which tool to run.
Privacy
All data stays local. The server reads and writes files on your machine and makes no network request of any kind -- not for licensing (keys are verified offline), not for fonts, not for telemetry. A PDF you stamp is never uploaded anywhere, which is the entire reason this exists.
Pairs with
- mcp-invoice, the invoice you sent, stamped PAID: the
mark_invoice_paidprompt chainsinvoice_getintopdf_stamp. - mcp-docx, write the proposal as
.docx, print it to PDF, then stamp, merge or split it here. - mcp-resume, join a CV, a cover letter and a portfolio into the one file an application form accepts.
- office-suite, several servers behind one install, one config entry.
Troubleshooting
npxhangs or fails to find the package: npm publish for this package is pending. Use the.mcpbbundle or the clone-and-build path above until it lands.- "is encrypted and was refused": the file is password or permissions protected. Open it in a PDF reader, export or print to a new PDF, and run the tool on that copy. This server never guesses or strips a password.
pdf_textreturned nothing: the page is a scan, or its font uses a custom encoding. The answer says which. There is no OCR here.- The stamp is too small or too big: by default it is sized to fit the page width. Pass
font_sizefor an exact point size, andopacitybetween 0 and 1. - "already exists and nothing was written": pass
overwrite: true, or a differentout_path. - Node version: requires Node >= 18. Check with
node -v.
MIT licensed. Support: [email protected]
Built by theluckystrike.
Frequently asked questions
Is there an MCP server to merge and split PDFs?
Yes. The pdf server at mcp.zovo.one merges, splits, rotates and fills PDF forms while preserving form fields. Free tier of 30 pages per file on split/pages/rotate operations, hosted remote endpoint, no install.
Can Claude fill PDF forms with an MCP server?
Yes - connect https://mcp.zovo.one/mcp/pdf and ask Claude to fill a form's fields or merge several PDFs. Output stays form-preserving, so filled fields remain editable.
Use these docs as an MCP server
Any MCP client (Claude, Cursor, Windsurf, VS Code) can read this repository's documentation directly via GitMCP - no install:
- Docs MCP URL: https://gitmcp.io/theluckystrike/mcp-pdf
来源:servers/pdf/README.md,提交 1bd9d69
工具
0版本历史
2- v0.22.5最新Oct 14, 2026
- v0.21.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分