{"_id":"pdfstudio-mcp","_rev":"4-e0605c16f65497368f926963da900289","name":"pdfstudio-mcp","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.0-stage":{"name":"pdfstudio-mcp","version":"0.0.0-stage","_id":"pdfstudio-mcp@0.0.0-stage","stub":true,"maintainers":[{"name":"krmerchant","email":"kayforkind@gmail.com"}],"dist":{"shasum":"fb07f85665a3b3f0760d6b0e417c113967bf822d","tarball":"https://registry.npmjs.org/pdfstudio-mcp/-/pdfstudio-mcp-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-pNQ9qno/uU+xqYe54QxxQ/u6MhlZIFrP1c4lJdUrhKqHW+OCEQEnIwJX7DTcsTQG44xE4HJ4ssRIif0amOfL8w==","signatures":[{"sig":"MEUCIGJCOh/6KQfLPt0pxbJ9Owi/3bOeNIvhySWfqhR/9h1kAiEA6vzn87naRHe1j9GI0CSUDnj2HpawoyIDSI9KmDkgAEY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335},"_npmUser":{"name":"krmerchant","email":"kayforkind@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"1.0.0":{"name":"pdfstudio-mcp","version":"1.0.0","keywords":["mcp","model-context-protocol","pdf","redaction","pdf-editing","local-first","claude","cursor","ai-agents"],"license":"MIT","_id":"pdfstudio-mcp@1.0.0","maintainers":[{"name":"krmerchant","email":"kayforkind@gmail.com"}],"homepage":"https://navigatorslab.com/pdf-studio/docs/guide/mcp.html","bugs":{"url":"https://github.com/Kayforkind/NavigatorsLab-PDF-Studio/issues"},"bin":{"pdfstudio-mcp":"dist/index.js"},"dist":{"shasum":"4ad1e534b7099a2d5a5ad9906d25c3fb9c61c7c7","tarball":"https://registry.npmjs.org/pdfstudio-mcp/-/pdfstudio-mcp-1.0.0.tgz","fileCount":4,"integrity":"sha512-4rbNoYLsIw5HxnZe29ELiQ7V/GZw5QqwCC8NPdpJjdHNZZeVyVWFLUDttfikEgUfL+fM0CiAMUf/psvGCCKbEA==","signatures":[{"sig":"MEYCIQCB76MBIQI31Wh8OCea/SV8ytc4p1CcHsJ3jMsNYADZsAIhAPIN/v4Fzm6n4zcDX4CAdT8RnwvFkAsu3cL7PCnrKE4Y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIEhL5+D9N8ZCeWqKSaM85LVaPxDYVYrj1xhcNO2JT0BZAiEAuACpdw64usug7hplvjCKBU+HJS1jj+JHXon++CDTZb8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pdfstudio-mcp@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2620578},"main":"./dist/index.js","type":"module","engines":{"node":">=20"},"gitHead":"c22c9b62b4823d05a7326d080e10750eab54c769","scripts":{"test":"vitest run --config vitest.config.ts","build":"tsc -p tsconfig.json && npm run bundle","smoke":"npm run build && node scripts/smoke.mjs","bundle":"node scripts/bundle.mjs","typecheck":"tsc --noEmit -p tsconfig.json","prepublishOnly":"npm run build && node scripts/smoke.mjs"},"_npmUser":{"name":"krmerchant","email":"kayforkind@gmail.com"},"repository":{"url":"git+https://github.com/Kayforkind/NavigatorsLab-PDF-Studio.git","type":"git","directory":"packages/mcp"},"_npmVersion":"10.9.9","description":"MCP server for PDFs: true text editing, burned-in redaction, OCR-free page ops as agent tools. 100% local, no network.","directories":{},"_nodeVersion":"22.23.4","dependencies":{"pdfjs-dist":"^4.10.38"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.7","vitest":"^5.0.0","esbuild":"^0.25.12","pdf-lib":"^1.17.1","typescript":"~5.7.2","@types/node":"^22.0.0","pdfstudio-core":"*","@modelcontextprotocol/sdk":"^1.32.2"},"_npmOperationalInternal":{"tmp":"tmp/pdfstudio-mcp_1.0.0_1793511297881_0.646720936910854","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"pdfstudio-mcp","version":"1.0.1","keywords":["mcp","model-context-protocol","pdf","redaction","pdf-editing","local-first","claude","cursor","ai-agents"],"license":"MIT","_id":"pdfstudio-mcp@1.0.1","maintainers":[{"name":"krmerchant","email":"kayforkind@gmail.com"}],"homepage":"https://navigatorslab.com/pdf-studio/docs/guide/mcp.html","bugs":{"url":"https://github.com/Kayforkind/NavigatorsLab-PDF-Studio/issues"},"bin":{"pdfstudio-mcp":"dist/index.js"},"dist":{"shasum":"5c5b4c39952c7c523e4fddfd9ddd06cd3e55bf9a","tarball":"https://registry.npmjs.org/pdfstudio-mcp/-/pdfstudio-mcp-1.0.1.tgz","fileCount":4,"integrity":"sha512-+IiiOouYd79v0Z5pGqJyC6Ij9jKdSU/JtMHql9S5Dqj0y4VLbzAbrqi5kmj729LaJmu8MHhcvQer4V8zrqoqdw==","signatures":[{"sig":"MEUCIBdxPSR+1U4eaPeZ0L0MdFaUCaLKZ/N81tVnog7uG4sYAiEAhd7UYILgw8Cc5lLHQazw5CXV9soBorfI4BnNH1uhDlw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFQFOWG5KIJKaESptM1HjbQizqWQs6vPE99ROPlUVz+fAiASHg+MT7oKkvbFic/LcN6c2fOwG25U9s1pD/Og3fTbrg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pdfstudio-mcp@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2620538},"main":"./dist/index.js","type":"module","engines":{"node":">=20"},"gitHead":"04cdbabb8e222ef3e496430f3890842141b694f9","mcpName":"io.github.Kayforkind/pdfstudio","scripts":{"test":"vitest run --config vitest.config.ts","build":"tsc -p tsconfig.json && npm run bundle","smoke":"npm run build && node scripts/smoke.mjs","bundle":"node scripts/bundle.mjs","typecheck":"tsc --noEmit -p tsconfig.json","prepublishOnly":"npm run build && node scripts/smoke.mjs"},"_npmUser":{"name":"krmerchant","email":"kayforkind@gmail.com"},"repository":{"url":"git+https://github.com/Kayforkind/NavigatorsLab-PDF-Studio.git","type":"git","directory":"packages/mcp"},"_npmVersion":"10.9.9","description":"MCP server for PDFs: true text editing, burned-in redaction, OCR-free page ops as agent tools. 100% local, no network.","directories":{},"_nodeVersion":"22.23.4","dependencies":{"pdfjs-dist":"^4.10.38"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.7","vitest":"^5.0.0","esbuild":"^0.25.12","pdf-lib":"^1.17.1","typescript":"~5.7.2","@types/node":"^22.0.0","pdfstudio-core":"*","@modelcontextprotocol/sdk":"^1.32.2"},"_npmOperationalInternal":{"tmp":"tmp/pdfstudio-mcp_1.0.1_1793511957839_0.13230143580396092","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"_id":"pdfstudio-mcp@1.0.2","bin":{"pdfstudio-mcp":"dist/index.js"},"bugs":{"url":"https://github.com/Kayforkind/NavigatorsLab-PDF-Studio/issues"},"dist":{"shasum":"7ac0abe3ead41f3a2ccc861b9887cfa86a4f36b5","tarball":"https://registry.npmjs.org/pdfstudio-mcp/-/pdfstudio-mcp-1.0.2.tgz","fileCount":4,"integrity":"sha512-ETKDoaWeXSCUBt4iLAZVwHMLqI/Zs9bIj4Jqz76raP8VpTZHtwOnaWLvFzaf6cKK86tTSOmORB0pPj3RPOL5QQ==","signatures":[{"sig":"MEUCIDw0Bz1lcv5vp2L6b+eYbW+tv/yxw3ihPawQ3OMzfPn+AiEAqyh4khK1kwzA/ny18fHpQdUqRDVnWVKPF1ES57B7g5c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBoQjjyCeCgCbl1POJDaaSVf/CHmKWAUDymE87UcNFHhAiB+Qq4888kE71oC0KBzcMWY46d9RibP7R6cUt9nKjYUrQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pdfstudio-mcp@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2620664},"main":"./dist/index.js","name":"pdfstudio-mcp","type":"module","engines":{"node":">=20"},"gitHead":"b0ef738d5a1873b2ce81a0e1c23ee0ebddb57e41","license":"MIT","mcpName":"io.github.Kayforkind/pdfstudio","scripts":{"test":"vitest run --config vitest.config.ts","build":"tsc -p tsconfig.json && npm run bundle","smoke":"npm run build && node scripts/smoke.mjs","bundle":"node scripts/bundle.mjs","typecheck":"tsc --noEmit -p tsconfig.json","prepublishOnly":"npm run build && node scripts/smoke.mjs"},"version":"1.0.2","_npmUser":{"name":"krmerchant","email":"kayforkind@gmail.com"},"homepage":"https://navigatorslab.com/pdf-studio/docs/guide/mcp.html","keywords":["mcp","model-context-protocol","pdf","redaction","pdf-editing","local-first","claude","cursor","ai-agents"],"repository":{"url":"git+https://github.com/Kayforkind/NavigatorsLab-PDF-Studio.git","type":"git","directory":"packages/mcp"},"_npmVersion":"10.9.9","description":"MCP server for PDFs: true text editing, burned-in redaction, OCR-free page ops as agent tools. 100% local, no network.","directories":{},"maintainers":[{"name":"krmerchant","email":"kayforkind@gmail.com"}],"_nodeVersion":"22.23.4","dependencies":{"pdfjs-dist":"^4.10.38"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.7","vitest":"^5.0.0","esbuild":"^0.25.12","pdf-lib":"^1.17.1","typescript":"~5.7.2","@types/node":"^22.0.0","pdfstudio-core":"*","@modelcontextprotocol/sdk":"^1.32.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdfstudio-mcp_1.0.2_1793512237234_0.11519536687541931"}}},"time":{"created":"2026-11-01T05:33:42.055Z","modified":"2026-11-01T05:50:37.658Z","0.0.0-stage":"2026-11-01T05:33:42.055Z","1.0.0":"2026-11-01T05:34:57.986Z","1.0.1":"2026-11-01T05:45:57.952Z","1.0.2":"2026-11-01T05:50:37.319Z"},"bugs":{"url":"https://github.com/Kayforkind/NavigatorsLab-PDF-Studio/issues"},"license":"MIT","homepage":"https://navigatorslab.com/pdf-studio/docs/guide/mcp.html","keywords":["mcp","model-context-protocol","pdf","redaction","pdf-editing","local-first","claude","cursor","ai-agents"],"repository":{"url":"git+https://github.com/Kayforkind/NavigatorsLab-PDF-Studio.git","type":"git","directory":"packages/mcp"},"description":"MCP server for PDFs: true text editing, burned-in redaction, OCR-free page ops as agent tools. 100% local, no network.","maintainers":[{"name":"krmerchant","email":"kayforkind@gmail.com"}],"readme":"# pdfstudio-mcp\n\n**Give your agent hands on PDFs — locally.** Read, search, edit real text, redact by deleting the\nbytes, merge, split, rotate, and rearrange pages over the Model Context Protocol.\n\nNo API key. No cloud. No upload endpoint. Parsing (`pdf.js`), editing (content-stream rewriting),\nand writing (`pdf-lib`) all run in the server process, so a document never leaves the machine\nrunning it.\n\n```bash\nnpx pdfstudio-mcp --root ~/Documents --read-only\n```\n\nThe agent talks to it over stdio. `--root` bounds every path the agent can touch (default: the\ncurrent directory).\n\n## Why this one\n\nMost PDF tools for agents can *read*. This one can also **change the file**: the edit tools rewrite\nthe page's content stream, so the original characters are deleted rather than covered. Redaction\ngoes further — it removes the covered text operators, rebuilds the output, and then scans the\nresulting bytes for every covered string in UTF-8, UTF-16, and hex form. **If anything is still\nrecoverable, the tool refuses and writes no file.** A redaction that cannot be proven is not\nreported as a success.\n\n## Install\n\n```bash\nnpx pdfstudio-mcp --help\n```\n\nAlso listed in the official MCP registry as `io.github.Kayforkind/pdfstudio`, so registry-aware\nclients can find it by name.\n\nFor a pinned install:\n\n```bash\nnpm i -g pdfstudio-mcp\npdfstudio-mcp --root ./docs\n```\n\n### Claude Code\n\n```bash\nclaude mcp add pdfstudio -- npx -y pdfstudio-mcp --root /path/to/your/docs --read-only\n```\n\n### Cursor, Cline, VS Code, or any MCP client\n\n```json\n{\n  \"mcpServers\": {\n    \"pdfstudio\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"pdfstudio-mcp\", \"--root\", \"/path/to/your/docs\", \"--read-only\"]\n    }\n  }\n}\n```\n\nDrop `--read-only` only when the agent genuinely needs to write files.\n\n## Tools\n\n| Tool | Writes | What it does |\n| --- | --- | --- |\n| `pdf_info` | — | Page count, page sizes, rotation, metadata |\n| `pdf_extract_text` | — | Text per page, delimited and marked untrusted |\n| `pdf_search_text` | — | Page/line/snippet hits with optional case sensitivity |\n| `pdf_edit_text` | ✓ | Find/replace **real** text in the content stream; `replace: \"\"` deletes |\n| `pdf_redact_text` | ✓ | Burn in every line containing a string; returns the full verification report |\n| `pdf_redact_rect` | ✓ | Burn in rectangles (`page`, `x`, `y`, `w`, `h` in points, origin bottom-left) |\n| `pdf_merge` | ✓ | Merge PDFs in order |\n| `pdf_split` | ✓ | One file per range spec; `%d` and `%s` in the output template |\n| `pdf_rotate` | ✓ | Rotate pages 90/180/270° clockwise |\n| `pdf_pages` | ✓ | Delete and/or reorder pages |\n\n`--read-only` registers only the three read tools, so an agent cannot modify anything.\n\nEvery mutating tool writes to an explicit output path — never in place. A redaction failure throws\ninstead of returning partial output, and the refusal carries the same machine-readable report as a\nsuccess (`pdfstudio.redact-report/v1`: pages, regions, strings checked, byte-scan and extraction\nverification, refusal reason).\n\n## Security model\n\n- **Path containment.** Every path is resolved against `--root` with `realpath`, so `..` escapes,\n  absolute paths outside the root, NUL bytes and symlinks pointing out of the tree are all\n  rejected. Reads require a regular file (no FIFOs, sockets, or devices).\n- **Least privilege.** `--read-only` is recommended and registers only read tools.\n- **No network.** The server makes no outbound calls; there is no telemetry and no update check.\n- **Prompt injection.** PDF content is untrusted input. Extraction and search output is wrapped in\n  `<document-text>` delimiters with an explicit warning, and every read tool's description repeats\n  that the agent must treat document text as data, never as instructions.\n- **Protocol hygiene.** stdout carries JSON-RPC only; stray logging is redirected to stderr so a\n  noisy dependency cannot corrupt framing.\n\n## What it does not do\n\n- No OCR. Scanned pages have no text layer to edit; use PDF Studio's on-device OCR first.\n- No rendering, so no image extraction, thumbnails, or visual comparison.\n- No certified digital signatures (it can draw a signature, not sign cryptographically).\n- Replacement text uses Helvetica metrics: near-identical on exotic fonts, not glyph-perfect.\n\n## From a clone\n\n```bash\ngit clone https://github.com/Kayforkind/NavigatorsLab-PDF-Studio\ncd NavigatorsLab-PDF-Studio\nnpm install\nnpm run build -w pdfstudio-mcp        # tsc + bundle → packages/mcp/dist/index.js\nnode packages/mcp/dist/index.js --root ./docs --read-only\n```\n\nPoint a client at `packages/mcp/dist/index.js` instead of `npx`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pdfstudio\": {\n      \"command\": \"node\",\n      \"args\": [\"/abs/path/packages/mcp/dist/index.js\", \"--root\", \"/path/to/docs\", \"--read-only\"]\n    }\n  }\n}\n```\n\n### Tests\n\n```bash\nnpm test -w pdfstudio-mcp      # unit tests: handlers, path containment, prompt-injection framing\nnpm run smoke -w pdfstudio-mcp # boots the BUNDLED server over stdio:\n                               # handshake → tools/list → extract → redact → re-search → escape\n```\n\nThe smoke test is the important one for releases: it exercises `dist/index.js`, the artifact users\nactually run, not the TypeScript source.\n\n## Publishing (maintainers)\n\nThe package ships one bundled file, with `pdfjs-dist` external and declared as a dependency.\n\n```bash\ncd packages/mcp\nnpm run build      # tsc typecheck/emit + esbuild bundle\nnpm run smoke      # 9 checks against dist/index.js — must pass\nnpm publish        # prepublishOnly re-runs build + smoke\n```\n\n`server.json` is the manifest for the official MCP registry; publish it with the registry's\n`mcp-publisher` after the npm release. Bump `version` in **both** files together — the registry\nentry points at a specific npm version.\n\n## Companion CLI\n\nThe same engine is available as `pdfstudio` (`pdfstudio info`, `extract-text`, `search`,\n`edit-text`, `redact`, `merge`, `split`, `rotate`, `pages`) for shell scripts and CI.\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}