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

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助手在你自己的電腦上合併、拆分、擷取、旋轉、重排、蓋章並讀取 PDF 檔案的文字。

可以做什麼
檢查與統計 PDF:頁面尺寸、紙張名稱、旋轉、中繼資料、是否加密,以及多個檔案的頁數合計,無法讀取的檔案會個別回報。合併與拆分:依指定順序合併 PDF,依頁碼範圍拆分,把選定頁面擷取或重排為新檔案。調整頁面:以 90 度的倍數旋轉,並用預設或自訂文字蓋章,可設定顏色、位置、透明度與字級。讀取內容:盡力從頁面內容串流擷取文字,並輸出 AcroForm 表單欄位值。商務頁尾:把已儲存的公司名稱與統一編號寫入每頁頁尾。授權與紀錄:查看或啟用 Pro 金鑰,並檢視最近 25 次操作。
適用情境
適合處理發票、合約、掃描檔或報告,希望從對話中完成例行的頁面層級 PDF 操作,而不必使用網頁上傳工具,特別適用於不願上傳到第三方網站的檔案。
執行需求
以本機程序在使用者電腦上執行(僅桌面端),需要 Node.js 18 或更新版本。npm 套件據說明尚未發布,可使用一鍵 .mcpb 安裝包或複製原始碼自行建置。選用的 Pro 授權金鑰透過 MCP_LICENSE_KEY 環境變數提供,或呼叫 license_activate 啟用。商務頁尾會讀取由搭配伺服器寫入的共用商務資料。
安裝前請注意
工具會依你提供的路徑寫入新檔案;已存在的輸出會被拒絕,除非設定 overwrite,輸出路徑同時是輸入時也會被阻擋。加密 PDF 會被寫入類工具拒絕。超過 100 MB 的輸入與非 PDF 檔案會被拒絕。文字擷取不含 OCR,掃描檔與自訂或 CID 字型編碼會失敗;蓋章文字受內建字型限制,無法使用中日韓文字。選用的 Pro 為一次性付費。README 的常見問題提到託管遠端端點,與本清單所述的本機執行方式不一致。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pdfs,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

[pdf demo]

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):

json
{  "mcpServers": {    "pdf": {      "command": "npx",      "args": ["-y", "@theluckystrike/mcp-pdf"]    }  }}

Claude Code:

sh
claude mcp add pdf -- npx -y @theluckystrike/mcp-pdf

(.cursor/mcp.json):

json
{  "mcpServers": {    "pdf": {      "command": "npx",      "args": ["-y", "@theluckystrike/mcp-pdf"]    }  }}

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:

sh
git clone https://github.com/theluckystrike/mcp-servers.git && cd mcp-serversnpm installnpm run build -w packages/mcp-license -w servers/pdf

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

ToolWhat it does
pdf_infoPage count, every page's size in points and millimetres, the paper name (A4, Letter, custom), the rotation already on each page, the metadata (title, author, producer, dates) and whether the file is encrypted
pdf_countPage count per file plus the total, for any number of PDFs. A file it cannot read is reported per file; the rest still count
pdf_mergeJoin PDFs into one, in the order given. Page sizes are kept as they are, and a merged file with mixed sizes says so
pdf_splitOne new file per range. "1-3,5,7-" gives pages 1-3, page 5, and page 7 to the end. out_path_pattern takes {n}, {range} and {name}
pdf_pagesExtract selected pages into one new PDF, in the order you write them. "5,1,1" puts page 5 first and page 1 in twice
pdf_rotateTurn pages by a multiple of 90 degrees, added to the rotation the page already had, which is what a sideways scan needs
pdf_stampDraw text on the pages: PAID and DRAFT presets, or any text, colour, position, opacity and size. Centre stamps go on the 45-degree diagonal
pdf_watermark_businessYour business name and VAT id in the footer of every page, from the shared profile mcp-invoice and mcp-docx write
pdf_textBest-effort text extraction from the page content streams. See the honest caveats below
pdf_reorderWrite a new PDF with the pages in a new order. The order must name every page exactly once, so nothing is dropped by accident
license_statusShow free or Pro mode
license_activateActivate a Pro key (verified offline)

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

You sayTool
"Mark invoice INV-2026-0007 as paid."mark_invoice_paid prompt, then pdf_stamp
"Stamp DRAFT across this contract before I send it."pdf_stamp
"Join these three PDFs into one file."pdf_merge
"Split the scan: pages 1-3 are the invoice, 4 onwards is the receipt."pdf_split
"Pull pages 2 to 6 out of this and save them separately."pdf_pages
"This scan is sideways, turn it."pdf_rotate
"How many pages are in all of these?"pdf_count
"What does page 1 of this PDF say?"pdf_text
"Put my company name and VAT number in the footer."pdf_watermark_business
"Move the cover page to the front."pdf_reorder

Worked example

You: Stamp PAID on ~/invoices/INV-2026-0007.pdf and save a copy.
  pdf_stamp {    path: "~/invoices/INV-2026-0007.pdf",    text: "PAID",    position: "center",    out_path: "~/invoices/INV-2026-0007-paid.pdf"  }  -> Stamped "PAID" on 1 page  -> ~/invoices/INV-2026-0007-paid.pdf, 0.9 MB

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

FreePro
pdf_info, pdf_count, pdf_textUnlimitedUnlimited
pdf_mergeUp to 5 files per callAny number of files
pdf_split, pdf_pages, pdf_rotateFiles up to 30 pagesAny length
pdf_stampThe PAID and DRAFT presets in their preset coloursAny text, any colour, any size
pdf_watermark_business-Your business name and VAT id in the footer
pdf_reorder-Yes

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 TJ array 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:

Error: /path/merged.pdf already exists and nothing was written.Pass overwrite: true to replace it, or give a different out_path.

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:

Error: out_path /path/scan.pdf is also an input of this operation, so writing it would destroy the source.Nothing was written. Write beside it instead - /path/scan-out.pdf - and, if the result really is meant totake the original's place, rename it yourself once you have checked it.

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ŁACONE stamps as OPLACONE, 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_size must 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_text caps one answer at 200,000 characters and names the pages argument 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_info reports a file's own pdfa_claim, and every tool that writes says plainly that its output no longer holds that claim.
  • Forms are read, not filled: pdf_text prints 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_text section.

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_paid prompt chains invoice_get into pdf_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

  • npx hangs or fails to find the package: npm publish for this package is pending. Use the .mcpb bundle 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_text returned 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_size for an exact point size, and opacity between 0 and 1.
  • "already exists and nothing was written": pass overwrite: true, or a different out_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:

來源:servers/pdf/README.md,提交 1bd9d69

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.22.5最新Oct 14, 2026
  2. v0.21.0Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Pdfs 整合