mcp-pdf
Merge, split and fill PDF forms from Claude
MCP server for PDF tools that merge, split, stamp and read PDF files; merges and splits pages on your own machine. Merge, split, stamp and read PDFs, pure JavaScript.
Works with Claude Desktop, Claude Code, Cursor and any Model Context Protocol client. Runs on your own machine, or hosted with no install.
Product page: https://mcp.zovo.one/s/pdf — what it does, the tools it exposes, and a live token endpoint.
Install
Hosted, nothing to install. Get a token from https://mcp.zovo.one/mcp/connect (the connect page) or https://mcp.zovo.one/mcp/token (the same token as JSON); a free anonymous one is issued on the spot and a Pro key works the same way. Then point an MCP client at https://mcp.zovo.one/mcp/pdf over streamable-http and send the token as Authorization: Bearer <token>.
If your client cannot set headers, put the token in the path instead: https://mcp.zovo.one/mcp/pdf/t/<token>. Both forms work. The bare URL with no token answers 401 on tools/call, so the token is not optional.
Claude Desktop, one click. Download pdf.mcpb from the latest release and double-click it.
From source. The mirror is self-contained: every @theluckystrike/* dependency is vendored, so a fresh clone builds with no extra setup.
git clone https://github.com/theluckystrike/mcp-pdf.git
cd mcp-pdf
npm install && npm run buildThen point your client at the built entry point:
{
"mcpServers": {
"pdf": {
"command": "node",
"args": ["/absolute/path/to/mcp-pdf/dist/index.js"]
}
}
}
@theluckystrike/mcp-pdfis not published on npm yet, so annpx -y @theluckystrike/mcp-pdfcommand will fail. The three paths above are the working ones and each is exercised by CI.

Read-only mirror of mcp-servers/servers/pdf. See MIRROR.md.
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.
Related MCP server: pdfeverything
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):
{
"mcpServers": {
"pdf": {
"command": "npx",
"args": ["-y", "@theluckystrike/mcp-pdf"]
}
}
}Claude Code:
claude mcp add pdf -- npx -y @theluckystrike/mcp-pdf(.cursor/mcp.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:
git clone https://github.com/theluckystrike/mcp-servers.git && cd mcp-servers
npm install
npm run build -w packages/mcp-license -w servers/pdfThen 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
Tool | What it does |
| Page 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 |
| Page count per file plus the total, for any number of PDFs. A file it cannot read is reported per file; the rest still count |
| Join PDFs into one, in the order given. Page sizes are kept as they are, and a merged file with mixed sizes says so |
| One new file per range. |
| Extract selected pages into one new PDF, in the order you write them. |
| Turn pages by a multiple of 90 degrees, added to the rotation the page already had, which is what a sideways scan needs |
| Draw text on the pages: |
| Your business name and VAT id in the footer of every page, from the shared profile mcp-invoice and mcp-docx write |
| Best-effort text extraction from the page content streams. See the honest caveats below |
| Write a new PDF with the pages in a new order. The order must name every page exactly once, so nothing is dropped by accident |
| Show free or Pro mode |
| Activate 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 say | Tool |
"Mark invoice INV-2026-0007 as paid." |
|
"Stamp DRAFT across this contract before I send it." |
|
"Join these three PDFs into one file." |
|
"Split the scan: pages 1-3 are the invoice, 4 onwards is the receipt." |
|
"Pull pages 2 to 6 out of this and save them separately." |
|
"This scan is sideways, turn it." |
|
"How many pages are in all of these?" |
|
"What does page 1 of this PDF say?" |
|
"Put my company name and VAT number in the footer." |
|
"Move the cover page to the front." |
|
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 MBThe 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
Free | Pro | |
| Unlimited | Unlimited |
| Up to 5 files per call | Any number of files |
| Files up to 30 pages | Any length |
| The | Any text, any colour, any size |
| - | Your business name and VAT id in the footer |
| - | 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
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:
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 to
take 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Ł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: support@zovo.one
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
Available Tools
12 toolslicense_activateActivate licenseA
Activate a Pro key (MCPL1.xxx.yyy) from checkout: verified offline against a built-in public key, saved to your config file. A wrong, malformed or expired key is refused, unsaved. license_status reads it back.
Inputs: key (required).
license_statusLicense statusA
Report this server's licence state: product, tier free or pro, licence id, expiry, the key source and the upgrade URL. No arguments, no network. Explains a free-tier refusal; license_activate installs a key.
Inputs: no named parameters.
pdf_countCount pages in several PDFsB
Page count per file plus the total, for any number of PDFs, with how many were readable. A file that cannot be read is reported on its own row and the others still count. Read-only. Free and unlimited.
Inputs: paths (required).
pdf_infoInspect a PDFB
Call this tool to inspect a PDF: page count, page sizes in points/mm, paper name, metadata (title, author, producer, dates) and whether it is encrypted. Read-only, never modifies the file. Free tier: unlimited.
Inputs: path (required).
pdf_mergeMerge PDFs into one fileA
Call this tool to join several PDFs into one, in the order given. Page sizes are kept as-is, so a merged file may have mixed sizes, and the answer says so. Inputs are never modified. Free tier: up to 5 files per merge.
Inputs: paths (required), out_path (required), overwrite.
pdf_pagesExtract pages into a new PDFA
Call this tool to pull selected pages into one new PDF, in the order written: "2,4-6" gives four pages. Asking for a page twice copies it twice. The input is never modified. Free tier: files up to 30 pages.
Inputs: path (required), pages (required), out_path (required), overwrite.
pdf_reorderReorder the pages of a PDFA
Call this tool to write a new PDF with pages in the order you give. The order must name every page exactly once, so nothing drops by accident; use pdf_pages for a subset. Pro.
Inputs: path (required), order (required), out_path (required), overwrite.
pdf_rotateRotate pagesA
Call this tool to turn pages by a multiple of 90 degrees, clockwise for positive. Rotation is added to whatever the page already had, for a sideways scan. Writes a new file. Free tier: files up to 30 pages.
Inputs: path (required), degrees (required), out_path (required), pages, +1 more.
pdf_splitSplit a PDF into several filesA
Call this tool to write one new PDF per range. Ranges are 1-based and may be open-ended: "1-3,5,7-" gives pages 1-3, page 5, and 7 to the end. The input is never modified. Free tier: files up to 30 pages.
Inputs: path (required), ranges (required), out_path_pattern (required), overwrite.
pdf_stampStamp text on a PDFA
Call this tool to draw a word such as PAID or DRAFT across the pages, in a colour and position you choose. Writes a new file; input untouched. Free tier: the PAID and DRAFT presets in their preset colours.
Inputs: path (required), text (required), out_path (required), color, +5 more.
pdf_textRead the text of a PDFARead-onlyIdempotent
Call this tool for best-effort text extraction from standard-font PDFs. Returns nothing for a scan (no OCR), or glyph indices for a custom-encoded font, and says which case applies. Read-only. Free tier: unlimited.
Inputs: path (required), pages.
pdf_watermark_businessStamp your business details in the footerB
Call this tool to put your business name and VAT id in the footer of every page, from the shared profile mcp-invoice and mcp-docx write. Use it before sending a document out. Pro.
Inputs: path (required), out_path (required), pages, overwrite.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct role: inspection/counting, extraction, and specific output-producing PDF operations. The potentially overlapping trio pdf_split, pdf_pages, and pdf_reorder is explicitly differentiated by descriptions (ranges vs subset vs full-page permutation). License tools are also cleanly separated from PDF content tools.
Names are consistently snake_case and use recognizable prefixes: pdf_ for document tools and license_ for licensing. The only minor inconsistency is that some suffixes are nouns (pdf_info, pdf_pages) while others are verbs (pdf_merge, pdf_rotate), but the pattern remains readable and predictable.
Twelve tools are well-scoped for a PDF utility server, with each tool covering a meaningful operation. The two license-related tools support the product tiering without bloating the surface.
The set covers core PDF workflows: inspection, counting, text extraction, merge, split, page selection, rotation, stamping, watermarking, and reordering. Minor gaps remain, such as OCR/scan text recovery, metadata editing, or compression, but agents can work around most of these for common tasks.
Maintenance
Related MCP Connectors
Merge, split, extract, rotate, reorder and stamp PDF pages from your AI chat, all offline.
Merge, split, extract, rotate, reorder and stamp PDF pages from your AI chat, all offline.
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Privacy-first PDF tools over MCP: merge, split, rotate, delete, compress, protect, inspect.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceThe local PDF workflow for Claude Desktop and MCP hosts: fill, sign, merge, split, extract, and analyze PDFs without sending files to a web app.7 npm160MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to perform 13 PDF operations (merge, split, compress, watermark, encrypt, and more) on local files via MCP.3-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to edit text inside real PDF files in place while preserving fonts and layout, with a before/after preview. Also supports compressing, merging, splitting, converting, translating, generating and querying PDFs through a hosted remote MCP endpoint.MIT
- AlicenseAqualityBmaintenanceLocal MCP server for PDFs: read PDFs into Markdown with tables, charts and OCR, export to Word, PowerPoint, EPUB and Excel, and merge, split, fill, compare and edit PDFs. Works only inside the folders you allow; nothing is uploaded.3088 npmApache 2.0