Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/nizoka/pdfnative-mcp/copilot-instructionsgit clone --depth 1 https://github.com/Nizoka/pdfnative-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/nizoka/pdfnative-mcp/copilot-instructions)<a href="https://agentmods.dev/instructions/nizoka/pdfnative-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/nizoka/pdfnative-mcp/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01391 | $0.01391 |
| Opus 5 | $0.00696 | $0.00696 |
| Sonnet 5 | $0.00278 | $0.00278 |
| Haiku 4.5 | $0.00139 | $0.00139 |
Grade A, and why
pdfnative-mcp copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pdfnative-mcp - Project Guidelines
Full context (architecture, tool schemas, output system, security design):
docs/KNOWLEDGE_BASE.md. Don't duplicate it here.
Overview
MCP server bridging pdfnative (v1.7.x) to AI clients over stdio or Streamable
HTTP, on the MCP TypeScript SDK v2 (@modelcontextprotocol/server, MCP
2026-07-28 with automatic 2025-era fallback). 28 tools, 6 prompts. Current release
1.6.0. Three runtime dependencies (pdfnative, the MCP SDK, zod) — never add one.
Quality bar: production-grade OSS (strict TypeScript, strong validation, secure
file IO, no egress except operator-configured TSA / OCSP / CRL endpoints,
deterministic releases).
Architecture (one line each)
- src/cli.ts — stdio (
serveStdio) / Streamable HTTP (createMcpHandler) entry point. - src/http.ts — Node http ↔ Web Request/Response bridge + Host/Origin loopback guard.
- src/auth.ts — opt-in HTTP bearer token (
PDFNATIVE_MCP_HTTP_TOKEN, constant-time compare, 401 + WWW-Authenticate). - src/base64.ts — base64 boundary helpers (data: URI tolerated, PEM-vs-DER and double-encoding hints).
- src/server.ts — tool registry (+ MCP annotations) + request handlers on the low-level
Server+ SERVER_INSTRUCTIONS + SERVER_CACHE_HINTS; resources & prompts capabilities. - src/tools/* — one file per tool (JSON schema
as const+ parallel Zod + handler); inspect-layout.ts (28th tool) reuses the generate_basic_pdf block schema + layout fragment. - src/network.ts — the only egress path: operator-configured TSA / OCSP / CRL providers + SSRF guard; URLs never come from tool arguments.
- src/blocks.ts — the 7 extended document blocks (table, image, link, toc, barcode, svg, formField) → 13 block kinds in total.
- src/layout.ts — pageSize / margins / headerTemplate / footerTemplate / compress / debug / encrypt fragment (PdfLayoutOptions) shared by the nine document tools.
- src/table.ts, src/barcode.ts, src/form.ts, src/image.ts — bodies shared by a dedicated tool and its inline block (form.ts maps
textarea→multilineText; image.ts checks magic bytes + PNG IHDR, 24 MiB per-call budget; embed_image stays unbounded). - src/watermark.ts — text and/or image watermark + position; PDF/A-1b transparency guard.
- src/inflate-cap.ts — PDFNATIVE_MCP_MAX_INFLATE_BYTES → engine decompression cap (read once at boot; invalid value refuses to start) + PDF_PARSE_FAILED mapping.
- src/print.ts — shared print-production schema (boxes, bleed, marks, userUnit, outputIntent, metadata, creationDate).
- src/diagnostics.ts — PDF/A diagnostics sink (
strict/includeDiagnostics/embedFonts) +mapBuildError. - src/encryption.ts — shared password/encrypt schema + decrypt error mapper.
- src/chart.ts — shared charts v2 schema + mapper (add_chart and the generate_basic_pdf chart block).
- src/resources.ts — native MCP resources over the sandbox output dir (pdfnative://output/…).
- src/text.ts — newline sanitizer (Safe PDF/A).
- src/output.ts — output mode (base64 or sandboxed file write).
- src/errors.ts — ToolError, SecurityError, GovernanceError.
- tests/* — unit tests for tool behavior and sandbox security; tests/_encrypted-fixtures.ts builds encrypted PDFs in-process; tests/catalogue-superset.test.ts keeps the live catalogue a superset of tests/_fixtures/tool-shape.v1.5.0.json (never regenerate that fixture).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 80 lines · 1,391 tokens per session scan A 33805fd288dc
pdfnative-mcp copilot-instructions.md is an instructions file published in the GitHub repository Nizoka/pdfnative-mcp (2 stars, last pushed 11d ago), licensed MIT. It adds 1,391 tokens to every session, about $0.0070 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
docs-to-pdf CLAUDE.md
Claude Code instructions for jean-humann/docs-to-pdf, covering claude development guide for docs-to-pdf, project overview, development environment setup, using mise (recommended) and install mise (if not already installed).
Portwood CLAUDE.md
Claude Code instructions for Portwood-Global-Solutions/Portwood, covering claude.md — portwood, skills, how this project runs (from 2026-08-10), release cadence and triage.
prfaq CLAUDE.md
Instructions for punt-labs/prfaq, covering how i write code, mandatory reading, no "pre-existing" excuse, standards and development workflow.
nutrient-dws-client-typescript AGENTS.md
Instructions for PSPDFKit-labs/nutrient-dws-client-typescript, covering agents.md, rules, definition of done and where to look.
nutrient-dws-client-typescript CLAUDE.md
Instructions for PSPDFKit-labs/nutrient-dws-client-typescript: Canonical agent instructions live in @AGENTS.md — read it first.
jsignpdf AGENTS.md
AGENTS.md instructions for intoolswetrust/jsignpdf, covering agents.md - jsignpdf, project overview, build commands, module structure and key documentation artifacts.