Pdfnative
About
Enterprise-grade PDF engine for AI agents. Pure TypeScript, zero-dependency, and local-first. Allows agents to generate ISO-compliant PDF/A documents, handle digital signatures (PKCS#7), and process high-performance layouts (800+ pages in seconds).
Details
- Author
- Nizoka
- Downloads
- 361
- Categories
- Developer Tools, Other, File Management
Jump to
- Pure TypeScript, zero external dependencies.
- Generates 800+ pages in under 4 seconds.
- Supports ISO-compliant PDF/A and PKCS#7 digital signatures.
- 100% local processing — no external API calls.
- Tools to generate structured PDFs, add barcodes, and handle Unicode text.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PdfnativeCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Add the server to your MCP client configuration (e.g., claude_desktop_config.json or Cursor settings) using the command npx -y pdfnative-mcp. No additional installation or setup steps are required beyond configuring the JSON.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"pdfnative": {
"pdfnative": {
"command": "npx",
"args": [
"-y",
"pdfnative-mcp"
]
}
}
}
}
McpServers
{
"pdfnative": {
"command": "npx",
"args": [
"-y",
"pdfnative-mcp"
]
}
}
Model Context Protocol (MCP) serverthat bridges thepdfnativelibrary — a zero-dependency, ISO 32000-1 compliant PDF engine — to any MCP-compatible AI client (Claude Desktop, Cursor, Continue, ChatGPT, Zed, …).
pdfnative-mcpexposes24 production-grade toolsto any MCP host:
- 📊Native vector charts—add_chartrenders bar / horizontal-bar / line / pie / donut charts as pure PDF path operators (zero rasterisation, PDF/A-safe with auto alt text).generate_basic_pdfalso accepts achartblock for composition with text and tables.
- 📝Fill & flatten forms—read_form_fieldslists an existing AcroForm's fields;fill_formfills and/or flattens it via a non-destructive incremental update (the counterpart toadd_form).
- 🔐Encryption round-trip—encrypt_pdfre-secures with AES-128 / AES-256 (RC4 never emitted),decrypt_pdfrecovers an unencrypted copy, apasswordinput opens encrypted sources on the read-only tools, andmerge_pdfs/split_pdf/extract_pagesgainpassword+encrypt.
- 🔤Real text extraction—extract_textnow resolves each font's/ToUnicodeCMap (no more glyph-index output) and can return positionedruns.
- 🔗Native MCP resources— sandboxed generated PDFs becomepdfnative://output/…resources (resources/list+resources/read), with aresource_linkin file-mode results for cross-call re-reference.
- 🏷️Tool annotations— every tool advertisesreadOnlyHint/destructiveHint/idempotentHint/openWorldHint.
- ⬆Engine upgrade—pdfnativev1.6.0(decrypt/re-encrypt,extractText, fill/flatten, charts; colour-emoji subset 221 → 1167 glyphs).
- 🤝AI governance + human-in-the-loop—draft_governance_issuelets an agent draft a fully compliant GitHub issuelocally(draft.md+ machine-readable compliance report). The agent is adraftsman, never an autonomous submitter: a human is the only gate, and the server makeszeroGitHub writes and no outbound network calls. Backed by thegovernance_contractanddraft_issue_workflowMCP prompts.
- ✏️Markup annotations—annotate_pdfoverlays highlight, sticky-note, underline, strikeout, squiggly, square, circle, line, and freetext annotations on an existing PDF via incremental update. It is avisual review layer, not a redaction— underlying bytes remain.
- 🔢Page labels ininspect_pdf— read-only surfacing of/PageLabelsranges (roman, decimal, prefixed).
- ∑Math / scientific script—add_international_textacceptslang: 'math'(explicit, likeemoji) to embed the Noto Sans Math face on demand.
- 🧩MCP prompts— the server now advertises thepromptscapability withgovernance_contractanddraft_issue_workflow.
- ⬆Engine upgrade— pdfnativev1.5.0.
-
🆕Three page-tree tools—merge_pdfs,split_pdf,extract_pages(built onpdfnative v1.4.0's page-tree API; encrypted sources are rejected).
🔖Bookmarks, page labels & nested lists—generate_basic_pdfgainsoutline('auto'or explicit tree),pageLabels, multi-levellistitems, andviewerPreferences.
📐Table cell borders & alignment—add_tablegainscellBorders,cellVAlign, andviewerPreferences;add_international_textgainsviewerPreferences.
🔐Constant-time signing—sign_pdfsigns RSA and EC-DER keys through anode:cryptoprovider with a transparent pure-JS fallback; signatures stay interoperable.
🆕Toolextract_attachments— read embedded files back out of a PDF (completes the Factur-X / ZUGFeRD round-trip) with byte-for-byte payloads, afilenamefilter, and anincludeData: falsemetadata-only probe.
💧Watermarks—generate_basic_pdfandadd_tableaccept an optionalwatermark(text, opacity, angle, colour, position) rendered on every page.
🌐Unicodenormalize— opt-inNFC/NFD/NFKC/NFKDongenerate_basic_pdfandadd_international_text.
🪙Token-frugal reads— the read-only tools (inspect_pdf,verify_pdf,validate_pdf,extract_text,extract_attachments) accept optionalverbosity: 'summary'andfields: […]inputs for ~90% smaller responses on large results, with no loss of the fields agents branch on. Defaults are unchanged.
🪙No base64 duplication— generated PDFs (base64 mode) are returnedonceas an embeddedresourcecontent block instead of also being copied intostructuredContent.
🔧MCP registry publish fix—mcpNamenow uses the canonical GitHub login casing (io.github.Nizoka/pdfnative-mcp) so the registry's case-sensitive validation accepts the npm package.
- 🆕Toolvalidate_pdf— read-only PDF/UA (ISO 14289-1) structural conformance check.
- 🆕Six new scripts— Telugu, Sinhala, Tibetan, Khmer, Myanmar, Ethiopic (24 scriptstotal).
- 🆕COLRv1 colour emoji— native colour emoji with monochrome fallback.
- 🆕Newline sanitizer— embedded\nin paragraphs auto-splits into separate paragraphs (Safe PDF/A).
- 🆕Automatic NFC normalisationforadd_international_text.
- 🛠Engine upgrade—pdfnative v1.3.0: the Euro sign / CP-1252 symbols now extract correctly, and wrapped table cells get unique per-line MCIDs (PDF/UA-safe).
- 🆕Three new tools:verify_pdf,add_attachment(Factur-X / ZUGFeRD),extract_text.
- 🆕Smart-table fields:wrap,repeatHeader,zebra,caption,minRowHeight,cellPadding.
- 🆕inspect_pdfnow reportshasSignaturePlaceholderand per-attachment summary; newcheckvalues'placeholder'and'attachments'.
- 🆕Signing ergonomics:sign_pdfaccepts ECDSA SEC1 / PKCS#8 DER keys and auto-injects a/Sigplaceholder when missing (one-call signing of any PDF).
- 🆕Opt-in cache(PDFNATIVE_MCP_CACHE_DIR): SHA-256 keyed, 1 h TTL, 256 MiB LRU.
- 🆕_meta.apiVersionand per-tool_meta.examplesfor AI-agent discovery — seedocs/API_STABILITY.md.
- 🆕AI agent guide:docs/AI_GUIDE.md— decision tree + common pitfalls. See also the rootAGENTS.mdoperations manual.
- 🆕PDF/A authoring guide:[docs/guides/PDFA.md.
- 🛠Env-var rename:PDFNATIVE_MCP_OUTPUT_DIR(wasPDFNATIVE_MPC_OUTPUT_DIR; old name still works with a one-shot deprecation warning).
- ✅Now shipped:merge_pdfs,split_pdf,extract_pages(v1.3.0),annotate_pdf(v1.4.0), and theadd_chart/read_form_fields/fill_form/encrypt_pdf/decrypt_pdftools plus the encrypted round-trip and native MCP resources (v1.5.0).redact_pdfstaysdeferred— pdfnative can overlay/flatten but notremovepage content, and an overlay-only "redaction" would create false security, so it is intentionally not shipped (tracked as an upstream content-removal request).
- base64(default)— the generated PDF is returnedonceas an embeddedresourcecontent block (adata:application/pdf;base64,…URI);structuredContentcarries only{ mode, sizeBytes }.
- file— the PDF is written to a sandboxed directory configured viaPDFNATIVE_MCP_OUTPUT_DIR. File output is disabled unless this variable is set; absolute paths, path traversal, non-.pdfextensions, and NUL bytes are all rejected.
Upgrading from v1.1.0:the only behaviour change is that base64-mode bytes are no longer duplicated intostructuredContent.base64. Read them from the embeddedresourceblock instead:
- const base64 = response.structuredContent.base64; // v1.1.0 + const block = response.content.find((c) => c.type === 'resource'); + const base64 = block.resource.blob; // v1.2.0
Token-frugal reads (v1.2.0).The four read-only tools accept two optional inputs:
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





