pdfops-mcp
Officialpdfops-mcp is an MCP server for deterministic PDF workflows, letting agents inspect, fill, create, edit, extract, secure, and generate PDFs without handling PDF bytes in model context.
Inspect AcroForm fields and generate paste-ready fill templates.
Fill PDF forms, optionally flattening values or opening password-protected PDFs.
Merge, split, extract, delete, rotate, watermark, and number PDF pages.
Generate invoices from structured data, including Factur-X/ZUGFeRD e-invoices.
Create PDFs from Markdown, text, CSV, HTML, or JPG/PNG images.
Extract text and tables from born-digital PDFs; export tables to CSV or XLSX.
Search PDFs for text or regex matches and return hit coordinates.
Detect blanks on flat PDFs and add fillable text, checkbox, radio, dropdown, or signature fields.
Stamp text, images, barcodes, and QR codes at exact positions.
Read and set PDF metadata.
Unlock, protect, or set PDF permissions/passwords.
Embed attachments such as XML, CSV, JSON, images, or PDFs into PDFs.
Check PDFops API quota usage.
Operate on local paths, HTTPS URLs, or data URIs, with inline PDF outputs when no output path is given.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pdfops-mcp fill ~/docs/w9.pdf for Ada Lovelace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pdfops-mcp
MCP server that gives AI agents deterministic PDF tools, backed by the PDFops API: inspect AcroForm fields, fill forms, merge PDFs, generate invoices (including Factur-X / ZUGFeRD e-invoices), create PDFs from Markdown, text, CSV, HTML or images, read text and tables out of PDFs, and edit PDFs (extract, delete, rotate and split pages, watermark, page numbers, stamp text, images and barcodes, add form fields, embed files, unlock, protect, metadata). Nothing to host and no native dependencies on your machine.
Beside a local agent, tools operate on file paths, so PDF bytes never transit the model context: your agent says "fill /tmp/form.pdf and save to /tmp/out.pdf" and gets a one-line confirmation back. Every PDF input also accepts an https:// URL or a data:application/pdf;base64,… URI, and every output can be returned inline instead of written — which is what makes the server work on hosted runtimes (see below).
Install
Claude Code
claude mcp add pdfops -- npx -y pdfops-mcp
# with a key:
claude mcp add pdfops -e PDFOPS_API_KEY=pdfops_live_… -- npx -y pdfops-mcpClaude Desktop (claude_desktop_config.json) / Cursor (.cursor/mcp.json)
{
"mcpServers": {
"pdfops": {
"command": "npx",
"args": ["-y", "pdfops-mcp"],
"env": { "PDFOPS_API_KEY": "pdfops_live_…" }
}
}
}VS Code (.vscode/mcp.json, note the servers key and type)
{
"servers": {
"pdfops": {
"type": "stdio",
"command": "npx",
"args": ["-y", "pdfops-mcp"],
"env": { "PDFOPS_API_KEY": "pdfops_live_…" }
}
}
}Any other stdio client (Windsurf, Cline, Zed, your own agent): command npx, args -y pdfops-mcp. Per-client walkthrough and a real tool-call transcript: pdfops.dev/mcp.
PDFOPS_API_KEY is optional — without it you get the keyless trial (100 requests/IP/month). A free key (250/month, no card) takes one field at pdfops.dev/pricing.
File access is confined. The server reads and writes only inside PDFOPS_ROOT, which defaults to the directory the client starts it in (your home directory if that is /). Set it to the folder(s) holding your files, separated by : (; on Windows), e.g. -e PDFOPS_ROOT=$HOME/Documents/forms. PDF inputs and outputs must be .pdf files and inputs must start with a %PDF header. Since 0.5.0 a few tools also read other file types from the same folders: .png, .jpg and .jpeg images (pdf_image_to_pdf, image stamps in pdf_edit), the attachment sources of pdf_add_attachment (.xml, .csv, .json, .txt, .md, .html, .xlsx, .pdf and the image types), and pdf_extract_text writes a .xlsx workbook when you ask for tables_format: "xlsx". Symlinks are resolved before the check, and a link is judged by the file it points to, so a link named logo.png that points at .env is refused. Beyond PDFs, nothing whose path below the root has a dot-prefixed file or folder name (.env, .config, .docker, .claude, .credentials.json) is ever read, images must start with PNG or JPEG magic bytes, a .pdf attachment must be a real PDF, and a file over 4 MiB is refused without being read. URLs must be public https:// addresses (private, loopback and cloud-metadata hosts are refused on every redirect hop); that still means any https:// source lets the agent make an outbound GET request to a URL of its choosing, which is inherent to URL sources. On Linux an output file is created, checked and cleaned up through a handle on its folder, so a folder swapped for a link mid-write cannot redirect it; on macOS and Windows those steps go by path, so the check does not hold against another local process that swaps folders inside the root while a write is in flight. API calls never follow redirects, time out after 60 seconds, and responses over 32 MB or inline results over 7 MB are refused (pass output_path for large results). Since 0.4.2.
Related MCP server: pdf-agent-toolkit-mcp
Tools
Tool | What it does |
| List a PDF's form fields (names, types, options, values) + a paste-ready fill template. |
| Fill AcroForm fields → write the filled PDF. Optional |
| Merge ≥2 PDFs in order → write the result. |
| Structured data → complete invoice PDF. Deterministic: same input, byte-identical output. Set |
| Keep only the listed pages, in the order given (also reorders and duplicates) → write the result. |
| Remove the listed pages, keep the rest in order → write the result. |
| Rotate pages clockwise by 90, 180, 270 or -90 degrees; all pages unless |
| Split into several PDFs by |
| Stamp a diagonal text watermark (opacity, size, colour, position, page selection). |
| Print page numbers from a |
| Save without encryption so print/copy restrictions are gone. Does not crack unknown passwords. |
| Encrypt with a user and/or owner password and a list of allowed permissions. |
| Read page count, per-page sizes and rotation, title/author/dates, encryption flag and form field count. |
| Write title, author, subject, creator and keywords. |
| Stamp text, PNG/JPEG images (logos, signature images) and barcodes or QR codes at exact positions on chosen pages. |
| Read the text and tables of a born-digital PDF, page by page. |
| Search a born-digital PDF for a word, phrase or regex and get each hit's page and box, in the same coordinates |
| Markdown, plain text or CSV → a new PDF, with no HTML engine. |
| Render an HTML string to a PDF with a headless browser. Each render costs 5 requests of quota once the renderer is reached. |
| JPG and PNG images → a PDF, one image per page. |
| For a flat PDF with no fillable fields: detect the blanks drawn as lines, boxes, underscores and checkboxes and return text and checkbox fields (name from the nearest label, confidence, position) to review. Read-only. The entries can be passed to |
| Create fillable AcroForm fields (text, checkbox, radio, dropdown, signature box) at exact positions, or with |
| Embed files, such as an XML or CSV data file, in a PDF. |
| Quota check for the configured key. |
Skill
Since 0.7.0 the package ships one Agent Skill, pdf-workflows, served over MCP (the Skills over MCP extension) next to the tools. It tells the model in what order to call the tools: read a form's fields with pdf_inspect before pdf_fill, detect and add fields on a flat PDF, what a scan cannot do, and which calls cost more quota. Claude Code 2.1.331 or later lists it as /pdfops:pdf-workflows when the server is registered as pdfops; other clients ignore it. To turn it off in Claude Code, add a deny rule Skill(mcp__pdfops__*) in /permissions. The tools work the same with or without it.
Hosted endpoint (no install)
PDFops also runs this server for you at https://pdfops.dev/api/mcp (Streamable HTTP). It works without a key (keyless trial cap of 100 calls/IP/month); a free key from https://pdfops.dev/pricing#free-key raises the cap. Clients that support OAuth can instead sign in with an email address and a 6-digit code when the free allowance runs out (https://pdfops.dev/mcp#sign-in):
claude mcp add --transport http pdfops https://pdfops.dev/api/mcp
# with a key:
claude mcp add --transport http pdfops https://pdfops.dev/api/mcp --header "Authorization: Bearer $PDFOPS_API_KEY"Sources must be https:// URLs or data: URIs, and results come back inline. Setup for Cursor and VS Code: https://pdfops.dev/mcp#remote.
Running remotely (Smithery, Glama hosted, cloud IDE gateways)
A hosted MCP runtime executes this server on a machine where your agent's file paths do not exist. Nothing changes in the config — pass sources the server can reach and skip output_path:
Inputs (
pdf_path,pdf_paths): anhttps://URL the server can fetch (≤4 MB per PDF, ≤4.5 MB per request — the API's limits), or adata:application/pdf;base64,…URI for small files.Outputs: omit
output_pathand the PDF-producing tools (pdf_fill,pdf_merge,pdf_invoice,pdf_rotate, …) return the PDF inline as an embeddedapplication/pdfresource (pdfops://filled.pdf, …) that the client saves.pdf_extract_textwithtables_format: "xlsx"returns its workbook the same way, as an embedded resource with the Excel media type (pdfops://tables.xlsx). Withoutput_pathset, the file is written where the server runs.
Locally, absolute paths keep working exactly as before and remain the recommended form — bytes stay off the model context.
Example prompts
"What fields does ~/forms/fw9.pdf have?" →
pdf_inspect"Fill ~/forms/fw9.pdf for Ada Lovelace, 12 Analytical Way, London; save it flattened as ~/out/w9-ada.pdf" →
pdf_inspect, thenpdf_fillwithflatten: true"Fill the onboarding form once per row of contractors.csv into ~/out/" → one
pdf_inspect, thenpdf_fillper row"Merge ~/out/w9-ada.pdf, ~/docs/nda.pdf and ~/docs/cover.pdf into one packet, cover first" →
pdf_merge"Invoice Globex for 3 days of consulting at $650, 8.5% tax, due in 30 days" →
pdf_invoice"Drop pages 1-2 of ~/docs/scan.pdf and rotate the rest 90 degrees" →
pdf_delete_pages, thenpdf_rotate"Split ~/docs/report.pdf into 10-page chunks in ~/out/" →
pdf_splitwithevery: 10,output_dir"Pull every table out of ~/docs/statement.pdf into ~/out/tables.xlsx" →
pdf_extract_textwithtables_format: "xlsx""Find where 'Total due' appears in ~/docs/invoice.pdf and stamp PAID next to it" →
pdf_find_text, thenpdf_edit"Make a German Factur-X invoice for Acme GmbH" →
pdf_invoicewithe_invoice: "factur-x""How many PDFops requests do I have left this month?" →
pdfops_usage
Example agent flow
"Fill the W-9 template at ~/docs/w9.pdf for Ada Lovelace and merge it with ~/docs/cover.pdf"
pdf_inspect→ discovers field names + fill templatepdf_fill→ writes the filled W-9pdf_merge→ writes the combined packet
Links
API docs: pdfops.dev/docs · OpenAPI: pdfops.dev/openapi.json · Typed client: pdfops-sdk · Questions: hello@pdfops.dev
Privacy Policy
This server runs on your machine and sends only what a tool call needs to the PDFops API (https://pdfops.dev): the PDF bytes you point it at, the field values you supply, and your API key if you set one. PDFops processes the request in memory and returns the result; it does not store your documents. API requests are logged with usage metadata to run quotas and the service. The full policy is at https://pdfops.dev/privacy. Questions: hello@pdfops.dev.
MIT © PDFops
Available Tools
24 toolspdf_add_attachmentEmbed files in a PDFADestructiveIdempotentInspect
Embed one or more files (for example an XML or CSV data file) in a PDF as attachments. Each entry in files has a source (a local path, an https:// URL or a data: URI with base64) and optional name, mime_type, description (at most 1,000 characters) and relationship (Alternative, Data, Source, Supplement or Unspecified, default Unspecified; the PDF/A-3 AFRelationship value). A local path must end in .xml, .csv, .json, .txt, .md, .html, .xlsx, .pdf, .png, .jpg or .jpeg and lie inside the allowed directories (PDFOPS_ROOT, default the working directory). name is 1-255 characters and at most 255 UTF-8 bytes with no / or backslash or control characters, and defaults to the file name of a path or the last part of an https:// URL path (a data: URI needs a name). mime_type looks like text/xml, with no parameters and no #. At most 10 files and 3 MB in total per call, and at most 200 attachments in the finished PDF. A PDF whose list of embedded files has over 2,000 entries (name_tree_too_large) or an unreadable existing name (attachments_too_complex) is refused. A name already used by an attachment in the PDF (as a key or as an entry's /UF or /F), or twice in the call, is refused. Existing content, including any existing attachments, is kept. Each file keeps its full name; a plain-ASCII lookup key for each is returned in the result as keys. Unknown keys are rejected. The whole file is saved again, so an existing digital signature on the PDF stops validating. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: files (required), pdf_path (required), password, output_path. Returns: keys, bytes, output_path, resource_uri
pdf_add_fieldsAdd fillable form fields to a PDFADestructiveIdempotentInspect
Add fillable form fields (AcroForm) to an existing PDF at exact positions, or (detect true) find them on a flat PDF automatically: text, multiline text, checkbox, radio group, dropdown and signature box. Coordinates are PDF points measured from the bottom-left corner of the page as the viewer sees it (1 inch = 72 pt; US Letter is 612 x 792), the same frame and 1-based page numbers as pdf_edit; x and y are the field's bottom-left corner and the whole rectangle must lie inside the page (each side at least 4 pt). Every entry needs type, name and page; every type except radio also needs x, y, width and height; radio and dropdown need options. Unknown keys are rejected. A radio entry is one group whose options each carry their own value, x, y, width and height. Text takes multiline, max_length, default and font_size; checkbox takes checked; dropdown takes options (strings), default and font_size. All entries also take required, read_only, border (default true) and background (default false). The signature type creates an EMPTY signature field for a signing tool to use: nothing is signed, it is not an e-signature. At most 200 entries and 200 widgets per call, and 2,000 fields in the finished form. Fields are plain AcroForm with no JavaScript. pdf_fill fills the result and pdf_inspect lists the new fields. For a flat PDF, pdf_detect_fields returns suggested fields that can be passed as fields; detect true does both steps in one call. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: pdf_path (required), pages, detect, fields, +4 more. Returns: note, bytes, warning, next_pages, +5 more
pdf_delete_pagesDelete pages from PDFADestructiveIdempotentInspect
Delete pages from a PDF: remove the listed pages and return the remaining pages in their original order, for example to drop a cover, blank or sensitive pages. pdf_extract_pages takes the opposite approach and names the pages to keep. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified. Deleting every page fails with no_pages_left.
Inputs: pages (required), pdf_path (required), password, output_path. Returns: bytes, output_path, resource_uri
pdf_detect_fieldsDetect fillable fields in a flat PDFARead-onlyIdempotentInspect
Detect fillable form fields in a flat PDF (one with no form fields; pdf_inspect lists none): finds blanks drawn on the page as lines, boxes, underscores and checkboxes and returns a text or checkbox field for each, named from the nearest printed label, with a confidence from 0 to 1. Each entry has type, name, page, x, y, width, height in PDF points from the bottom-left of the page as the viewer sees it, the frame pdf_add_fields and pdf_edit use. The entries can be reviewed (wrong ones dropped, others renamed or adjusted) and passed to pdf_add_fields as fields (label and confidence are ignored there), and pdf_fill then fills the result; pdf_add_fields with detect true does detection and adding in one call. Only drawn blanks are found: not a blank area with no line or box, a scanned image, or shaded cells with no outline. Results are suggestions: confidence scores are estimates, low-confidence entries can be wrong, and some detections are table cells or rules that are not blanks. Pages are read with min_confidence (default 0.4; 0.6 gives fewer but surer fields) and max_pages (default 40, at most 100). Zero fields is a normal answer with a note. At most 200 fields per call; the pages argument describes continuing a large form. Read-only: the source is never modified.
Inputs: pdf_path (required), pages, password, max_pages, +1 more. Returns: note, count, pages, fields, +4 more
pdf_editAdd text, images or barcodes to a PDFADestructiveIdempotentInspect
Add text, images (logos, signature images, photos) and barcodes or QR codes to specific pages of an existing PDF at exact positions. Coordinates are PDF points measured from the bottom-left corner of the page as the viewer sees it (1 inch = 72 pt; US Letter is 612 x 792), so stamps land upright on any page size or rotation. Text uses standard fonts (WinAnsi characters only: CJK and emoji fail with unsupported_characters) and can wrap to max_width. Images are PNG or JPEG, up to 2 MB each and 10 distinct images per call (the PDF and all images together must stay under 4.5 MB), given as a local path, an https:// URL or a data:image/png;base64,... URI. Barcodes (QR, Data Matrix, PDF417, Aztec, Code 128, Code 39, EAN-13/8, UPC-A, ITF-14, Interleaved 2 of 5, GS1-128) are generated from a value and drawn as vector paths, so they scan at any print size (up to 25 per call). pdf_fill sets fillable form fields and pdf_watermark stamps a diagonal text on every page. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: items (required), pdf_path (required), password, output_path. Returns: bytes, output_path, resource_uri
pdf_extract_pagesExtract pages from PDFADestructiveIdempotentInspect
Extract pages from a PDF: keep only the listed pages, in the order given, and return them as a new PDF. Because order follows the spec, it also reorders pages ("3,1,2") and can duplicate them. It pulls a section out of a document; pdf_delete_pages removes pages instead, pdf_split makes several output files and pdf_merge joins documents. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified. Fails with invalid_pages if a page is out of range.
Inputs: pages (required), pdf_path (required), password, output_path. Returns: bytes, output_path, resource_uri
pdf_extract_textExtract text and tables from a PDFADestructiveIdempotentInspect
Extract text and tables from a born-digital PDF (one made by software: invoices, statements, reports, contracts, forms), page by page, in reading order, plus any tables found from the text layout as rows of cells. Scanned PDFs (images of pages) have no text layer and come back listed in pages_without_text: OCR is not supported. Set include_lines to also get each line with its position in PDF points from the bottom-left of the page as the viewer sees it, the same frame pdf_edit uses, so you can stamp text next to something you found. Up to 200 pages per call; pass pages to read a large document in parts. pdf_find_text searches for specific text. With tables_format xlsx the tables come back as one Excel workbook instead (one sheet per table, all cells text): written to output_path (a .xlsx file) when given, otherwise returned inline as an application/vnd.openxmlformats-officedocument.spreadsheetml.sheet resource (a workbook over 7 MB is never returned inline and needs output_path). The source PDF is never modified; output_path is only written with tables_format xlsx.
Inputs: pdf_path (required), pages, password, output_path, +2 more. Returns: bytes, pages, truncated, page_count, +5 more
pdf_fillFill PDF formADestructiveIdempotentInspect
Fill form fields (AcroForm) in a PDF and save or return the filled PDF. Field names must exist in the PDF (pdf_inspect lists them). All values are strings; checkboxes take "true"/"false"; dropdown/radio/optionlist values must be one of the field's options; text values must respect the field's maxLength from pdf_inspect. The source PDF is never modified. Returns the filled PDF written to output_path, or inline as an application/pdf resource when output_path is omitted; an existing file at output_path is overwritten. Owner-locked PDFs (empty user password, common for government blanks) fill without a password; a user-password PDF needs the password parameter, otherwise it is rejected with encrypted_pdf. A rejected fill writes no file at all.
Inputs: fields (required), pdf_path (required), flatten, password, +1 more. Returns: bytes, output_path, resource_uri
pdf_find_textFind text in a PDFARead-onlyIdempotentInspect
Find text in a PDF: search a born-digital PDF (one made by software: invoices, statements, reports, contracts, forms) for a word, phrase or pattern and get each hit with its page and box in PDF points from the bottom-left of the page as the viewer sees it, y on the text baseline: the same frame pdf_edit uses, so a hit's x, y, width and height tell you where to stamp. Case-insensitive unless case_sensitive is true. Set regex to treat query as a regular expression from a safe subset (literals, classes, dot, anchors, word boundaries, groups, alternation, quantifiers including lazy ones); backreferences, lookahead, lookbehind, named groups, property escapes and inline flags are rejected. A match never spans lines. Scanned PDFs have no text layer: their pages are listed in pages_without_text (no OCR). A long search continues across calls through next_page (see the pages argument). Read-only: the source is never modified.
Inputs: query (required), pdf_path (required), pages, regex, +4 more. Returns: hits, count, next_page, truncated, +4 more
pdf_html_to_pdfCreate a PDF from HTMLADestructiveIdempotentInspect
Render an HTML string to a PDF with a headless browser, so layout, CSS (flexbox, grid, print styles), images and web fonts come out as in a browser print. It takes HTML text only: there is no URL input, and JavaScript is switched off, so scripts do not run and pages that build themselves with JavaScript render empty. External resources (images, stylesheets, fonts) load only over https from public hosts; anything else (http, file, private or internal addresses, redirects to them) is blocked and skipped, and the PDF is still made. Data URIs work and are the safest way to include images. Letter or A4, portrait or landscape, margin in points (default 36), backgrounds printed by default, optional scale. html is capped at 1 MB, the document at 50 pages and 16 MB, external resources at 50 requests and 40 MB, and rendering at 15 seconds. A render that reaches the renderer counts as 5 requests against the monthly quota, not 1, whether it succeeds or fails; the html argument lists the cases that count for less. Resource, image and font details are in the html argument. pdf_text_to_pdf handles Markdown, text or CSV with no HTML, and pdf_invoice builds an invoice from data. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: html (required), scale, margin, landscape, +3 more. Returns: bytes, pages, output_path, resource_uri, +1 more
pdf_image_to_pdfMake a PDF from JPG and PNG imagesADestructiveIdempotentInspect
Make a PDF from JPG and PNG images: one image per page, in the order given. Each image is a local path (.png, .jpg, .jpeg), an https:// URL or a data:image/jpeg;base64,… or data:image/png;base64,… URI; the type is detected from the bytes, not the name. At most 100 images, each up to 4 MB, 4.5 MB in total. page_size "fit" (default) makes each page the image's own size at 72 dpi (1 px = 1 pt; pages longer than 5,000 pt on a side are scaled down, tiny images are enlarged to a 3 pt minimum); "a4" or "letter" put the image on a standard page, centred, shrunk to fit inside the margin and never enlarged. orientation (auto, portrait, landscape; default auto picks per image) applies to a4 and letter only. margin is 0-200 pt (default 0 for fit, where the page grows by the margin on every side; 36 for a4 and letter). A JPEG's EXIF orientation is applied, so phone photos come out upright. PNG: 8-bit and 16-bit, palette, grey, interlaced and transparent files work (transparency is kept); animated PNGs, other formats (GIF, WebP, HEIC, TIFF, SVG) and PDFs are rejected. JPEG: baseline and progressive, grey, RGB and Adobe-style CMYK. Very large images fail with image_too_large (PNG over 10 megapixels or a memory estimate; JPEG over 250 megapixels), and many large PNGs in one call with images_too_large_together. Deterministic: the same images give byte-identical output. pdf_merge joins images with existing PDFs when each image is an https:// URL or a data URI (it reads local paths for .pdf files only). Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: image_paths (required), margin, page_size, orientation, +1 more. Returns: bytes, output_path, resource_uri
pdf_inspectInspect PDF form fieldsARead-onlyIdempotentInspect
List the form fields (AcroForm) of a PDF: names, types, options, current values and per-field maxLength where declared, plus a fillTemplate object ready to pass to pdf_fill and a hasXFA flag (hybrid AcroForm/XFA inputs lose their XFA layer when filled). A PDF with no fillable form returns count 0. Read-only: the PDF is fetched or read but never modified. pdf_fill rejects unknown field names and over-length values; this tool lists the names and the maxLength values it checks against.
Inputs: pdf_path (required), password. Returns: count, fields, hasXFA, truncated, +1 more
pdf_invoiceGenerate invoice PDFADestructiveIdempotentInspect
Generate an invoice PDF from structured data (seller, buyer, line items, tax); no template needed. Deterministic: the same input produces byte-identical output. Without a paid PDFops key the output carries a small "Generated with pdfops.dev" footer line. Returns the invoice written to output_path, or inline as an application/pdf resource when output_path is omitted; an existing file at output_path is overwritten. An existing invoice PDF or a fillable template is populated with pdf_fill instead. Setting invoice.e_invoice to "factur-x" produces an e-invoice instead: a PDF/A-3 file with the invoice data embedded as factur-x.xml (UN/CEFACT Cross Industry Invoice, profile EN 16931, also called COMFORT). Several more fields then become required, and a missing one fails with einvoice_fields_required naming every missing field: invoice_number, date, currency (no default), due or payment_terms, from.country and to.country (ISO 3166-1 alpha-2 codes), from.vat_id (or from.tax_id with from.registration_id), tax_category when tax_rate is 0, and a UN/ECE Recommendation 20 unit code on every item. Amounts in the XML and on the page come from the same exact decimal arithmetic: each line is rounded to 2 decimals, VAT is computed once on the summed basis. On that path text is limited to Latin letters, Latin Extended-A, the euro sign and common punctuation (other characters fail with unrenderable_text); leading and trailing whitespace is trimmed, over-long or control-character text is refused with a 400, and long text wraps onto further lines or pages on the page and is carried in full in the XML. Per-item tax fields and other unknown fields are refused, and a buyer tax_id is refused (to.vat_id carries the buyer's VAT number). Checked in testing with the Mustang validator 2.26.0 (PDF/A-3 via veraPDF, XSD, EN 16931 schematron); this is not a statement of legal compliance, and XRechnung and Peppol output are not produced.
Inputs: invoice (required), output_path. Returns: bytes, output_path, resource_uri
pdf_mergeMerge PDFsADestructiveIdempotentInspect
Merge two or more PDFs into one, in the order given, and save or return the result. Source files are read only and never modified; an existing file at output_path is overwritten. Returns the merged PDF written to output_path, or inline as an application/pdf resource when output_path is omitted. This tool only concatenates whole documents: it does not reorder, rotate or delete pages within them (pdf_extract_pages, pdf_rotate and pdf_delete_pages do), does not fill forms (pdf_fill does) and does not build documents from data (pdf_invoice does). An unreadable or rejected input fails with an error and writes no file, so a partial merge is never left behind.
Inputs: pdf_paths (required), password, output_path. Returns: bytes, output_path, resource_uri
pdf_metadataRead PDF metadataARead-onlyIdempotentInspect
Read a PDF's document info: page_count, per-page width/height (points) and rotation, title, author, subject, keywords, creator, producer, creation_date, modification_date (ISO 8601, null when absent), whether it was encrypted, and has_form / form_field_count. The page count and per-page sizes describe a document's shape for splitting, rotating or filling. Read-only: the PDF is fetched or read but never modified.
Inputs: pdf_path (required), password. Returns: pages, title, author, creator, +10 more
pdfops_usageCheck PDFops quotaARead-onlyIdempotentInspect
Check the current PDFops API quota for the configured key: tier, limit, used, remaining, the billing period, and the reset timestamp. Read-only and safe to call before a batch to confirm there is headroom. Requires PDFOPS_API_KEY.
Inputs: no named parameters. Returns: tier, used, limit, period, +2 more
pdf_page_numbersAdd page numbers to PDFADestructiveIdempotentInspect
Add page numbers to a PDF using a format template with {n} (page number) and {total} (page count), e.g. "Page {n} of {total}". Default is "{n} / {total}" at bottom-center, 10 pt. Numbers sit upright for any page size or rotation. Standard Helvetica only (WinAnsi characters). Page i always shows start+i-1 even when pages selects only some pages. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: pdf_path (required), size, pages, start, +5 more. Returns: bytes, output_path, resource_uri
pdf_protectPassword-protect PDFADestructiveInspect
Encrypt a PDF with a password. user_password is required to open the result; owner_password lifts the permission restrictions. Give at least one (each 1 to 32 Latin-1 chars). permissions lists what stays ALLOWED from print, copy, modify, annotate, fill-forms (default all, except modify when an owner password is set; an empty list allows none). Restrictions only bind viewers when an owner password is set. Not byte-deterministic (random salts). Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: pdf_path (required), password, output_path, permissions, +2 more. Returns: bytes, output_path, resource_uri
pdf_rotateRotate PDF pagesADestructiveIdempotentInspect
Rotate pages of a PDF clockwise by 90, 180 or 270 degrees (or -90). Rotation adds to each page's existing rotation. Omit pages to rotate every page. It fixes sideways scans. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: degrees (required), pdf_path (required), pages, password, +1 more. Returns: bytes, output_path, resource_uri
pdf_set_metadataSet PDF metadataADestructiveIdempotentInspect
Write document info fields (title, author, subject, creator, keywords) into a PDF. Give at least one; an empty string sets an empty value. Unicode is fine. Keywords may be a list or a comma-separated string. The output is saved unencrypted. pdf_metadata reads the current values. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: pdf_path (required), title, author, creator, +4 more. Returns: bytes, output_path, resource_uri
pdf_splitSplit PDF into partsADestructiveIdempotentInspect
Split one PDF into several PDFs, either by explicit ranges (each comma group becomes one part: "1-2,3-5" gives two parts) or into fixed-size chunks (every=2 on 5 pages gives 1-2, 3-4, 5). Give exactly one of ranges or every. With output_dir the parts are written there as part-1.pdf, part-2.pdf, …; otherwise each part comes back inline as an application/pdf resource. Either way the result also includes a structured parts list (pages, page_count, bytes, and output_path or resource_uri). Existing part-N.pdf files with those names are overwritten, and part-N.pdf files from earlier runs in that directory are left as they are; the source is never modified. Limited to 100 parts and about 4 MB of total output; pdf_extract_pages returns a single range as one PDF.
Inputs: pdf_path (required), every, ranges, password, +1 more. Returns: count, parts
pdf_text_to_pdfCreate a PDF from Markdown, plain text or CSVADestructiveIdempotentInspect
Create a new PDF from Markdown, plain text or a CSV table, with no template and no input PDF. This is NOT HTML-to-PDF: it does not render HTML or CSS, and it has no custom fonts or images (images in Markdown stay literal text). Text is set in the standard Helvetica family, code and monospace text in Courier, on Letter or A4 pages. Markdown supports headings 1-6, bold, italic, inline code, links (printed as text plus the URL; http(s) and mailto links are also clickable), fenced code blocks, bullet and numbered lists, one-level blockquotes, horizontal rules, pipe tables (header shaded and repeated per page; column alignment ignored) and \pagebreak; anything else prints as typed. format text keeps spaces and line breaks exactly. format csv draws a table whose first row is the header (up to 20 columns, 10,000 rows, 100,000 cells). content is capped at 512 KiB and the output at 200 pages. WinAnsi characters only (English and Western European letters and common punctuation): emoji, Cyrillic, Greek and CJK fail with unsupported_characters, naming the character and its line and column. Very large tables or heavy inline formatting fail with content_too_complex. Deterministic: the same input gives byte-identical output, and the PDF carries no PDFops footer. pdf_edit adds text to an existing PDF and pdf_invoice builds an invoice from data. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: content (required), title, format, margin, +5 more. Returns: bytes, output_path, resource_uri
pdf_unlockRemove PDF restrictionsADestructiveIdempotentInspect
Remove a PDF's password protection and its print/copy/modify restrictions by saving an unencrypted copy. Works for owner-locked files (empty user password) with no password, and for user-password files when you pass the password. It does NOT crack unknown passwords: a wrong or missing user password fails with encrypted_pdf. A PDF that was not encrypted is returned re-saved, with note "not-encrypted". Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: pdf_path (required), password, output_path. Returns: note, bytes, output_path, resource_uri
pdf_watermarkAdd text watermark to PDFADestructiveIdempotentInspect
Add a diagonal text watermark to pages of a PDF (default: centered, 45 degrees, grey, 15% opacity). Text is upright and centered for any page size or existing page rotation. Standard Helvetica only: characters outside WinAnsi (e.g. CJK, emoji) fail with unsupported_characters. Typical text is DRAFT or CONFIDENTIAL; pdf_page_numbers adds page numbers instead. Returns the result written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline and need output_path); an existing file at output_path is overwritten. The source is never modified.
Inputs: text (required), pdf_path (required), size, color, +6 more. Returns: bytes, output_path, resource_uri
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool targets a distinct operation on a PDF, and the descriptions explicitly cross-reference near-neighbors (e.g. pdf_extract_pages vs pdf_delete_pages vs pdf_split, pdf_fill vs pdf_inspect vs pdf_add_fields, pdf_text_to_pdf vs pdf_html_to_pdf vs pdf_invoice vs pdf_image_to_pdf). Overlaps like metadata reads vs form inspection are cleanly separated. An agent can reliably pick the right tool from names plus descriptions.
Nearly all tools use a consistent pdf_ snake_case prefix and are highly readable. Minor deviations exist: pdf_invoice, pdf_metadata, and pdf_page_numbers are noun-style rather than verb_noun, and pdfops_usage breaks the pdf_ prefix convention. Overall the pattern is predictable with small exceptions.
24 tools is on the heavy side, but each maps to a genuinely distinct PDF operation (create by source type, page ops, forms, protection, text extraction, metadata) and none is redundant. For a full PDF toolkit the scope justifies the count, though it sits at the upper edge of comfortable.
The surface covers create/merge/split/extract/delete/rotate, edit, fill, add/detect fields, protect/unlock, metadata read+write, watermark, page numbers, text extraction/search, attachments and quota. Minor gaps remain: no digital signing (fields are added but not signed), no compression/optimization, no OCR, and no PDF-to-image export.
Maintenance
Related MCP Connectors
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
PDF tools for AI agents: validate, extract, merge, split, compress, OCR, sign and redact.
DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage n8n workflow automation instances through tools for workflow CRUD operations, execution monitoring, and webhook triggering. It facilitates programmatic interaction with n8n instances via the n8n API with AI-optimized descriptions and error handling.63MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to perform comprehensive PDF operations locally, including compression, text extraction, PII redaction, page organization, splitting, merging, watermarking, creation, and form filling, all without cloud uploads.17 npm-
- AlicenseAqualityDmaintenanceEnables AI agents to inspect PDFs, merge or extract pages, and clean text entirely offline through the Model Context Protocol, with no uploads, API keys, or network calls.446 npmMIT
- AlicenseBqualityCmaintenanceEnables AI agents to perform local-first PDF processing entirely on-device, including OCR write-back to make scans searchable, unlocking and re-encrypting PDFs, splitting/merging/rotating pages, and compressing files, with no cloud calls or file uploads.2514 PyPI1MIT