Borrowing it
Nothing to install: this file belongs to Nizoka/pdfnative-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Nizoka/pdfnative-mcp/main/CLAUDE.mdgit 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/claude-md)<a href="https://agentmods.dev/instructions/nizoka/pdfnative-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/nizoka/pdfnative-mcp/claude-md.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.1 | $0.02722 | $0.02722 |
| Opus 5 | $0.01361 | $0.01361 |
| Sonnet 5 | $0.00544 | $0.00544 |
| Haiku 4.5 | $0.00272 | $0.00272 |
Grade A, and why
pdfnative-mcp CLAUDE.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 7d 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Guidance for Claude Code (and other Claude-based agents) working in this repository.
For the runtime tool catalogue and end-user recipes, read AGENTS.md;
for architecture depth, docs/KNOWLEDGE_BASE.md. This file
is about contributing to the codebase, not using the server.
What this is
pdfnative-mcp is a thin, faithful Model Context Protocol server wrapping the
zero-dependency pdfnative PDF engine.
TypeScript (strict, ESM-only), Node ≥ 22, @modelcontextprotocol/server (MCP SDK v2,
protocol 2026-07-28 with automatic 2025-era fallback). 28 tools, 6 MCP prompts +
resources. Three runtime dependencies (pdfnative, the MCP SDK, zod). Current release: 1.6.0 (on pdfnative 1.7.0).
Commands
npm run build # tsc -p tsconfig.build.json (emits dist/)
npm run typecheck:all # tsc --noEmit (covers src + tests)
npm run lint # eslint src
npm test # vitest run
npm run test:coverage # vitest run --coverage (enforces thresholds)
npm run examples:check # runs examples/*.json live through the tools/call handler
npm run validate:pdfa # advisory: veraPDF over the 26-file PDF/A corpus (24 validated; skips when veraPDF is absent; VERAPDF_REQUIRED=1 fails closed; non-blocking in CI)
node scripts/tool-shape.mjs --write # ONLY after a deliberate tools/list schema change — refreshes tests/_fixtures/tool-shape.json (catalogue parity gate)
Quality gate (run before every commit/PR):
npm run typecheck:all && npm run lint && npm run test && npm run test:coverage && npm run build
Coverage thresholds (global, in vitest.config.ts): statements 89 · branches 80 ·
functions 90 · lines 91. New code must keep the aggregate above these; never lower them.
Architecture map
src/cli.ts— entry point (stdio viaserveStdioby default; Streamable HTTP viacreateMcpHandlerwhenPDFNATIVE_MCP_PORTis set; both with the SDK's legacy fallback).src/http.ts— Nodehttp↔ WebRequest/Responsebridge and the Host/Origin loopback guard for the HTTP transport (disconnect detection per response, not per socket).src/auth.ts— opt-in bearer token (PDFNATIVE_MCP_HTTP_TOKEN).src/server.ts— theTOOLSregistry (with MCPannotations), request handlers on the low-levelServer(notMcpServer.registerTool; the read tools' output schemas are projectable — every property optional — sostructuredContentalways validates, asserted bytests/schema-conformance.test.ts),dispatchOutput(duck-typed result → content builder),SERVER_INSTRUCTIONS,SERVER_CACHE_HINTS, and theresources/promptscapabilities.TOOL_API_VERSIONlives here.src/tools/<name>.ts— one file per tool: a hand-written JSON Schemaas const, a parallel Zod schema (kept in lock-step), and the handler.src/tools/inspect-layout.ts(28th tool) reusesgenerate_basic_pdf's block schema and the layout fragment.- Shared schema/util modules:
src/network.ts(operator-configured TSA / OCSP / CRL providers + SSRF guard — the only egress path),src/blocks.ts(the 7 extended document blocks —table,image,link,toc,barcode,svg,formField— on top of the 6 basic ones; 13 kinds total),src/layout.ts(pageSize/margins/headerTemplate/footerTemplate/compress/debug/encrypt→PdfLayoutOptions;assertLayoutPdfACompatible),src/table.ts/src/barcode.ts/src/form.ts/src/image.ts(bodies shared by a dedicated tool and its inline block;form.tsmapstextarea→multilineText;image.tsdecodes + checks magic bytes and the PNG IHDR,ImageByteBudget24 MiB per call —embed_imagestays unbounded, blocks / watermarks use the bounded variant),src/inflate-cap.ts(PDFNATIVE_MCP_MAX_INFLATE_BYTES→ engine cap;throwIfInflateCapError→PDF_PARSE_FAILED),src/print.ts(print-productionprint/outputIntent/metadata/creationDateschema + mappers),src/diagnostics.ts(PDF/A diagnostics sink,strict/includeDiagnostics/embedFonts,mapBuildError),src/encryption.ts(password +encryptschema,mapDecryptError),src/chart.ts(charts v2 schema +toChartBlock),src/cms.ts(CMS parser),src/pdf-introspection.ts(signature widgets,/DSS, page boxes, annotations),src/pagetree.ts(mapPageTreeError— page-index errors →VALIDATION_ERROR),src/base64.ts(base64 / DER boundary decoding with agent-facing diagnostics — use it for everypdfBase64/ DER input),src/pdfa.ts,src/doc-features.ts,src/watermark.ts(text and/or image +position),src/projection.ts(token-frugalverbosity/fields),src/output.ts(sandboxed file write),src/resources.ts. tests/— one*.test.tsper tool/module; shared fixtures are_-prefixed (_pdf-assert.ts,_cert-fixtures.ts,_pagetree-fixtures.ts,_encrypted-fixtures.ts,_ltv-fixtures.ts(offline mock PKI + RFC 3161 / OCSP / CRL providers),_tsa-server.ts(loopback TSA),_http-fixture.ts,_mcp-harness.ts).tests/http-modern.test.tsasserts the MCP 2026-07-28 conformance;tests/catalogue-parity.test.tscomparestools/listwith the structural fixturetests/_fixtures/tool-shape.json;tests/catalogue-superset.test.tsproves the live catalogue is a superset of the published 1.5.0 one (tests/_fixtures/tool-shape.v1.5.0.json— never regenerate that file). New in 1.6.0:document-blocks,layout-options,inspect-layout,watermark,inflate-cap,error-codes(src ↔ AGENTS §6 inventory).
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.
- 7d ago First seen · 90 lines · 2,722 tokens per session scan A c3b09e302325
pdfnative-mcp CLAUDE.md is an instructions file published in the GitHub repository Nizoka/pdfnative-mcp (2 stars, last pushed 13d ago), licensed MIT. It adds 2,722 tokens to every session, about $0.0136 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
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.