pdf-toolkit-mcp
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., "@pdf-toolkit-mcp compress this PDF file"
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.
pdf-toolkit-mcp
18 PDF operations for Claude Code, Claude Desktop, and any MCP client — via iLoveAPI.
Install · Tools · Recipes · Architecture · Security · FAQ
Disclaimer.
pdf-toolkit-mcpis an independent, community-built open-source client. It is not affiliated with, endorsed, sponsored, or certified by iLovePDF SL. The project talks to the public iLoveAPI REST service using your project credentials — nothing is proxied, resold, or relicensed. "iLovePDF" and "iLoveAPI" are trademarks of iLovePDF SL; this project does not claim ownership of those marks.
📖 Table of contents
Related MCP server: gurupdf-mcp
🎯 Why pdf-toolkit-mcp
Manual iLoveAPI | Raw |
| |
Callable from Claude Code / Claude Desktop / any MCP client | ❌ | ❌ | ✅ |
JWT signing + 5-step lifecycle handled for you | ❌ | ✅ | ✅ |
Validated Zod schemas (no bad inputs reach the API) | ❌ | ❌ | ✅ |
Path sandboxing against traversal | ❌ | ❌ | ✅ |
Structured error codes ( | ❌ | partial | ✅ |
Progress notifications during long OCR tasks | ❌ | ❌ | ✅ |
Bundled Claude Code skill with multi-step pipelines | ❌ | ❌ | ✅ |
Zero-setup install via | ❌ | ❌ | ✅ |
Free for personal use. iLoveAPI's free tier grants ~2,500 credits / month; this MCP itself is MIT-licensed and costs nothing.
🚀 Quick tour
After installation, just talk to Claude. The model figures out which tools to call:
You: Merge invoice-jan.pdf and invoice-feb.pdf into Q1.pdf, then compress it hard
and lock it with the password "2026q1".
Claude (planning):
1. merge_pdf → invoice-jan.pdf + invoice-feb.pdf → Q1.pdf
2. compress_pdf → Q1.pdf → Q1-compressed.pdf (level: extreme)
3. protect_pdf → Q1-compressed.pdf → Q1-compressed-protected.pdf
Claude (result):
✅ Created ~/docs/Q1-compressed-protected.pdf (312 KB, password-protected).📦 Install
Prerequisites
Node.js ≥ 18 (LTS recommended).
iLoveAPI project keys — free tier at developer.ilovepdf.com. Takes ~2 minutes:
Sign up → create a project → copy
Project public keyandProject secret key.Export them (or drop them into your client's MCP config — examples below).
Option A — Claude Code (CLI one-liner)
export ILOVEAPI_PROJECT_PUBLIC_KEY="project_public_xxx"
export ILOVEAPI_PROJECT_SECRET_KEY="secret_key_xxx"
claude mcp add pdf-toolkit -- npx -y pdf-toolkit-mcpRestart Claude Code and all 18 tools appear in the picker. Verify with /mcp → you should see pdf-toolkit: connected (18 tools).
Option B — Claude Code Plugin (includes the pdf-workflow skill)
/plugin marketplace add EigenCharlie/pdf-toolkit-mcp
/plugin install pdf-toolkit@EigenCharlie/pdf-toolkit-mcpThe plugin auto-configures the MCP server and installs a skill that teaches Claude five canonical multi-step PDF pipelines (see Workflow recipes).
Option C — Claude Desktop (claude_desktop_config.json)
Edit claude_desktop_config.json (%APPDATA%\Claude\ on Windows, ~/Library/Application Support/Claude/ on macOS):
{
"mcpServers": {
"pdf-toolkit": {
"command": "npx",
"args": ["-y", "pdf-toolkit-mcp"],
"env": {
"ILOVEAPI_PROJECT_PUBLIC_KEY": "project_public_xxx",
"ILOVEAPI_PROJECT_SECRET_KEY": "secret_key_xxx"
}
}
}
}Restart Claude Desktop — the 🔌 icon should show pdf-toolkit connected.
Option D — any MCP client via stdio
ILOVEAPI_PROJECT_PUBLIC_KEY=… ILOVEAPI_PROJECT_SECRET_KEY=… npx -y pdf-toolkit-mcpThe server speaks the standard MCP JSON-RPC 2.0 framing over stdio. Wire it into Cursor, Windsurf, mcphub, mcp-inspector, or anything else that speaks MCP.
Option E — Claude Desktop .mcpb bundle (drag-and-drop)
Grab pdf-toolkit-mcp-<version>.mcpb from the latest GitHub Release and drag it into Claude Desktop → Settings → Extensions. Claude will prompt for your iLoveAPI keys via the user_config section of the bundled manifest. No npx, no Node, no terminal.
Bundles ship unsigned (no publisher certificate yet). macOS Gatekeeper / Windows SmartScreen may warn on first install; verify the SHA-256 in the release notes before accepting.
Option F — MCP Registry (auto-discovered by compatible clients)
The server is indexed on the official MCP Registry under io.github.EigenCharlie/pdf-toolkit-mcp. Clients that browse the registry (Claude Desktop extension pane, VS Code MCP picker, mcphub, etc.) can install it without any manual config — they'll point at the npm package and prompt for the two iLoveAPI env vars automatically.
🧰 Tool catalog
All 18 tools are exposed with strict Zod schemas, additionalProperties: false, and return both a text summary and a file:// resource URI so the client can surface the output.
📚 Organize
Tool | What it does | Key inputs |
| Combine ≥ 2 PDFs in order |
|
| Split by page ranges ( |
|
| Keep a specific subset of pages |
|
🔄 Convert — from PDF
Tool | Output | Notes |
|
| Scanned PDFs → run |
|
| Works best on tabular source PDFs |
|
| One slide per PDF page |
|
|
|
🔄 Convert — to PDF
Tool | Accepts | Notes |
|
| Server-side rendering |
|
| Local HTML only; external assets may not resolve |
|
| One image per page, preserves order |
✏️ Edit
Tool | What it does | Key inputs |
| Rotate pages 90 / 180 / 270° clockwise |
|
| Stamp numbered footer/header |
|
| Text or image watermark |
|
🔐 Security
Tool | What it does | Key inputs |
| Remove known password |
|
| Add password |
|
🩹 Repair / OCR
Tool | What it does | Notes |
| Attempt structural repair on damaged PDFs | Useful before further processing |
| Run OCR to make scans searchable |
|
All tools accept absolute or CWD-relative paths for
input_file(s)and an optionaloutput_path(file or directory). Defaults place the result next to the first input with a timestamped name.
🍳 Workflow recipes
The bundled pdf-workflow skill (skills/pdf-workflow/SKILL.md) teaches Claude five canonical multi-step pipelines. You can also run these manually — just describe the end state and Claude chains the tools for you.
merge_pdf([a.pdf, b.pdf, c.pdf])
→ compress_pdf(level="recommended")
→ protect_pdf(password="…")office_to_pdf(report.docx)
→ add_watermark(mode="text", text="CONFIDENTIAL", opacity=30)
→ protect_pdf(password="…")extract_pdf_pages(scan.pdf, pages="3-9")
→ ocr_pdf(languages=["eng"])
→ pdf_to_wordcompress_pdf(big.pdf, level="extreme")
→ protect_pdf(password="…")repair_pdf(scan_broken.pdf)
→ ocr_pdf(languages=["eng"])
→ add_page_numbers(position="bottom-center")🏛 Architecture
┌────────────────────────────┐ stdio ┌──────────────────────────┐
│ Claude Code / Desktop │◀───────────▶│ pdf-toolkit-mcp server │
│ (or any MCP client) │ JSON-RPC │ (this repo) │
└────────────────────────────┘ └────────────┬─────────────┘
│
▼
┌──────────────────────┐
│ @ilovepdf/ │
│ ilovepdf-nodejs │
│ (JWT + HTTP) │
└──────────┬───────────┘
│
▼ HTTPS
┌──────────────────────┐
│ iLoveAPI servers │
│ api.ilovepdf.com │
└──────────────────────┘iLoveAPI 5-phase lifecycle (orchestrated in src/api/tasks.ts)
[ 10% ] start → POST /v1/start/{tool} (server assignment + task id)
[ 40% ] upload → POST /v1/upload (one call per file, progress scales)
[ 50% ] process → POST /v1/process (run the tool with params)
[ 90% ] download → GET /v1/download/{task} (bytes → Buffer)
[100% ] done → write to disk, emit file:// resource URIThe server emits MCP notifications/progress at each boundary so your client can render a live progress bar for slow operations (OCR, large merges).
Project layout
pdf-toolkit-mcp/
├── .claude-plugin/
│ ├── plugin.json # Plugin manifest
│ └── .mcp.json # MCP server config (npx -y pdf-toolkit-mcp)
├── skills/
│ └── pdf-workflow/
│ └── SKILL.md # 5-recipe skill for multi-step pipelines
├── src/
│ ├── index.ts # #!/usr/bin/env node shebang
│ ├── server.ts # MCP stdio bootstrap
│ ├── api/
│ │ ├── client.ts # iLoveAPI client singleton (CJS interop via createRequire)
│ │ ├── tasks.ts # 5-phase lifecycle orchestrator
│ │ ├── errors.ts # HTTP → structured PdfToolkitError mapping
│ │ └── types.ts # Types + error class
│ ├── tools/ # 18 tools, one file per concern
│ │ ├── _shared.ts # Zod fragments + writeOutputAndReport helper
│ │ ├── merge.ts split.ts compress.ts
│ │ ├── convertFromPdf.ts convertToPdf.ts
│ │ ├── pageOps.ts security.ts watermark.ts
│ │ ├── repair.ts ocr.ts
│ │ └── index.ts # allTools[] barrel
│ └── util/
│ ├── paths.ts # resolveInputs/resolveOutput + sandbox enforcement
│ ├── progress.ts # Progress adapter
│ └── logger.ts # stderr-only logger (stdio-safe)
├── tests/
│ ├── unit/ # client, paths, errors, tools.merge (25 tests)
│ └── integration/ # smoke.test.ts — gated on iLoveAPI creds
├── scripts/
│ └── inspector.sh # npm run inspect → MCP Inspector UI
└── .github/workflows/
├── ci.yml # ubuntu+windows × node 18/20/22
└── publish.yml # Publishes to npm on v* tags with --provenance⚙️ Configuration reference
Environment variables
Variable | Required | Default | Description |
| ✅ | — | Project public key from developer.ilovepdf.com |
| ✅ | — | Project secret key. Never logged. Used for local JWT signing. |
| ❌ | — | Absolute path. When set, all input/output paths must resolve inside this directory — traversal attempts throw |
| ❌ | — | Set to |
Structured error codes
Every failure surfaces a PdfToolkitError with a stable machine-readable code:
Code | Trigger | What to tell the user |
| Env vars not set | Point them at developer.ilovepdf.com |
| HTTP 400 / Zod parse failure | Fix the arguments |
| HTTP 401 | Regenerate the project keys |
| HTTP 402 | Free tier exhausted or tool not in plan |
| HTTP 404 | Input file or task missing |
| HTTP 429 | Back off and retry |
| SDK | Too many concurrent tasks |
| Path escapes | Reject the request |
| Unmapped iLoveAPI error | Check |
🔒 Security model
pdf-toolkit-mcp is designed to be safe to install on a developer machine:
Stdio only. The server never opens a network socket; it only makes outbound HTTPS calls to
api.ilovepdf.comvia the official SDK.No
console.log. JSON-RPC over stdio would corrupt on any stray stdout write, so every log line goes throughprocess.stderr.Secrets never persisted. Credentials live in env vars for the lifetime of the process and are never written to disk, log files, or tool responses.
JWT generated locally. The
@ilovepdf/ilovepdf-nodejsSDK self-signs JWTs with your secret key — no secret leaves the machine.Path sandbox (opt-in). Set
ILOVEAPI_SANDBOX_ROOTto constrain the server to a single directory tree; any path resolving outside throws before the API is ever called.Extension whitelists per tool.
html_to_pdfrejects.exe;image_to_pdfonly accepts common raster formats, etc.MIT licensed, audit-friendly. ~2k lines of TypeScript. No obfuscation, no minification, no postinstall scripts.
👩💻 Development
git clone https://github.com/EigenCharlie/pdf-toolkit-mcp.git
cd pdf-toolkit-mcp
npm installCommon tasks
Command | What it does |
| Compile TypeScript → |
| Watch-mode build |
|
|
| ESLint on |
| Vitest unit suite (no network) |
| Real iLoveAPI calls (requires creds) |
| Launch MCP Inspector against the local build |
Debugging inside Claude Code
Build locally:
npm run build.Register the local dist instead of npm:
claude mcp remove pdf-toolkit # if previously registered claude mcp add pdf-toolkit -- node "$(pwd)/dist/index.js"Set
PDF_TOOLKIT_DEBUG=1in your shell before launching Claude Code for verbose stderr.Stderr is visible with
claude mcp logs pdf-toolkit.
✅ Testing & CI
Unit tests — 25 tests across
client,paths,errors, andtools.merge. Fully mocked, no network. Run withnpm test.Integration smoke test —
tests/integration/smoke.test.tsspins up two minimal valid PDFs and exercises a realmerge_pdfend-to-end. Gated onILOVEAPI_*_KEYenv vars; automatically skipped in PR CI for security.CI matrix — .github/workflows/ci.yml runs
lint → typecheck → build → teston:OS:
ubuntu-latest,windows-latestNode:
18,20,22
🚢 Releasing
Publishing is automated on tag push:
npm version patch # or minor / major
git push --follow-tagsThe publish workflow then:
Re-runs lint + typecheck + build + tests.
Publishes to npm with
--access public --provenance(supply-chain attestation).Creates a GitHub Release with auto-generated notes.
Repo secret required: NPM_TOKEN (npm automation token).
🗺 Roadmap
v0.1 — 18 PDF tools, stdio transport, plugin + skill, CI, npm publish
v0.1.1 — MCPB bundle (
.mcpb) for Claude Desktop, marketplace manifest, MCP Registry submission (mcpName)v0.2 — Submit the Claude plugin to
anthropics/claude-plugins-official, publish an image-tools companion packv0.3 — 8 image tools (resize, convert, compress, crop, rotate, watermark, upscale, remove background)
v0.4 — Signature tools (signing flows require paid tier — gated behind env flag)
v1.0 — Optional Streamable-HTTP transport for hosted/multi-user setups
Have a feature request? Open an issue.
🙋 FAQ
Is this legal / safe / allowed by iLovePDF? Yes. It's a thin open-source client that uses your credentials — nothing is resold, relicensed, or proxied. The iLoveAPI Terms of Service explicitly permit open-source libraries using user-provided keys (several community SDKs have existed for years). This project does not ship any keys, does not use "iLovePDF"/"iLoveAPI" in its package name, and carries the required disclaimer.
Does it cost money? iLoveAPI offers ~2,500 credits per month free (enough for thousands of small ops). Heavier workloads need a paid iLoveAPI plan. This MCP itself is MIT and free forever.
Does it work offline? No. iLoveAPI is cloud-only, so every tool call requires internet access.
Can I pin a specific version?
Yes: claude mcp add pdf-toolkit -- npx -y pdf-toolkit-mcp@0.1.0.
Can I self-host?
Yes. Clone the repo, npm run build, and point your client at node ./dist/index.js. The server is entirely stateless.
What happens if iLoveAPI is down?
The tool returns a PdfToolkitError with code: "API_ERROR" and data.http_status. Claude can retry with exponential backoff on your behalf.
Can I use this without Claude? Yes — any MCP-compatible client works: Cursor, Windsurf, Zed, MCP Inspector, custom clients. The server is 100% spec-compliant.
🤝 Contributing
Contributions welcome! Small checklist before opening a PR:
npm run lint && npm run typecheck && npm test→ all green.New tools follow the pattern in src/tools/merge.ts (Zod schema →
runTask→writeOutputAndReport).Add at least one unit test.
Update the Tool catalog in this README if you add/rename a tool.
Bug reports are even more welcome — include the tool name, the arguments, and (if safe to share) the stderr output.
📜 License & trademarks
Released under the MIT License © 2026 Carlos.
"iLovePDF" and "iLoveAPI" are trademarks of iLovePDF SL. This project is an independent, community-built client and is not affiliated with, endorsed by, sponsored by, or certified by iLovePDF SL. The package name intentionally avoids both marks.
🙏 Credits
iLovePDF / iLoveAPI — the cloud PDF processing API that powers every tool call.
Anthropic — for Claude, Claude Code, and the Model Context Protocol specification.
@modelcontextprotocol/sdk, Zod, Vitest, ESLint — the toolchain this project stands on.Every contributor who reports issues, suggests tools, and sends pull requests. 🙌
Available Tools
18 toolsadd_page_numbersA
Stamp page numbers onto a PDF. Configure starting number, which pages to number, and placement (top/bottom + left/center/right).
Inputs: input_file (required), pages, output_path, starting_number, +2 more.
add_watermarkA
Stamp a text or image watermark onto every page of a PDF. For mode="text", provide text. For mode="image", provide image_file (.jpg/.jpeg/.png). Tune placement, rotation, and opacity as needed.
Inputs: mode (required), input_file (required), text, layer, +6 more.
compress_pdfA
Reduce the file size of a PDF. Choose compression_level "low", "recommended" (default), or "extreme". Outputs a .pdf file on disk and returns its path.
Inputs: input_file (required), output_path, compression_level.
extract_pdf_pagesA
Extract a subset of pages from a PDF into a new PDF. Specify pages as a list or range, e.g. "1,3,5-7".
Inputs: pages (required), input_file (required), output_path.
html_to_pdfA
Convert a local HTML file (.html or .htm) to a PDF. The HTML is rendered server-side; external assets referenced by the file may not be fetched.
Inputs: input_file (required), output_path.
image_to_pdfA
Combine one or more images (.jpg, .jpeg, .png) into a single PDF, one image per page, in the order provided.
Inputs: input_files (required), output_path.
merge_pdfA
Merge two or more PDF files into a single PDF, preserving order. Outputs a .pdf file on disk and returns its path.
Inputs: input_files (required), output_path.
ocr_pdfA
Run OCR on a PDF to make scanned text selectable/searchable. Accepts one or more language codes (e.g. "eng", "spa"). Large or image-heavy PDFs can take more than 60 seconds.
Inputs: input_file (required), languages, output_path.
office_to_pdfA
Convert a Microsoft Office document (Word, Excel, or PowerPoint) to a PDF. Accepts .doc, .docx, .xls, .xlsx, .ppt, and .pptx files.
Inputs: input_file (required), output_path.
pdf_to_excelA
Convert a PDF to a Microsoft Excel .xlsx spreadsheet. Works best when the source PDF contains clear tabular data; non-tabular PDFs may produce messy results.
Inputs: input_file (required), output_path.
pdf_to_jpgA
Convert a PDF to JPG images. In "pages" mode (default) each page becomes a JPG; in "extract" mode only embedded images are pulled out. Returns a .zip archive of the images.
Inputs: input_file (required), mode, output_path.
pdf_to_powerpointA
Convert a PDF to a Microsoft PowerPoint .pptx presentation. Each PDF page becomes an editable slide; conversion quality depends on the source.
Inputs: input_file (required), output_path.
pdf_to_wordA
Convert a PDF to an editable Microsoft Word .docx document. Conversion quality depends on the source (scanned PDFs produce poor results; use ocr_pdf first if needed).
Inputs: input_file (required), output_path.
protect_pdfA
Add password protection to a PDF. Anyone opening the output will need the supplied password.
Inputs: password (required), input_file (required), output_path.
repair_pdfA
Attempt to repair a damaged or malformed PDF. Useful for scanned PDFs that fail to open or render correctly in some readers. Produces a .pdf file on disk.
Inputs: input_file (required), output_path.
rotate_pdfA
Rotate pages in a PDF by 90, 180, or 270 degrees clockwise. Target specific pages with "pages" (e.g. "1,3,5" or "1-5"), or rotate all pages by default.
Inputs: rotation (required), input_file (required), pages, output_path.
split_pdfA
Split a PDF into multiple PDFs by page ranges (e.g. "1-3,5-7") or into fixed-size chunks. Returns a .zip archive containing the resulting PDFs.
Inputs: input_file (required), ranges, fixed_range, output_path.
unlock_pdfA
Remove password protection from a PDF. Requires the correct password. Produces an unprotected .pdf file on disk.
Inputs: password (required), input_file (required), output_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose, from conversions (pdf_to_excel, pdf_to_word) to manipulations (merge_pdf, split_pdf) and utilities (add_watermark, ocr_pdf). No two tools have overlapping functionality, ensuring an agent can reliably select the correct one.
Naming follows two main patterns: 'source_to_target' for conversions (e.g., pdf_to_excel, office_to_pdf) and 'verb_pdf' for operations (e.g., merge_pdf, rotate_pdf). However, 'add_page_numbers' and 'add_watermark' break the verb_pdf pattern, creating minor inconsistency.
With 18 tools, the server covers a comprehensive range of PDF operations without being overwhelming. Each tool serves a specific need, and the count is well-scoped for a PDF utility toolkit.
The toolkit covers most essential PDF operations: conversion to/from various formats, merge/split/extract, compression, security, OCR, watermarking, and repair. Minor gaps exist (e.g., lack of direct text extraction or annotation), but the set is highly functional.
Maintenance
Related MCP Connectors
13 stateless PDF tools for AI agents: merge, split, rotate, compress, watermark, redact, flatten, repair, add page numbers and fill PDF forms. Files are processed in memory and nothing is stored. Part of FreeDailyPro's 211+ MCP tools; trial key with 20,000 calls/month at freedailypro.com/developers.
PDF tools: merge, split, compress, convert, OCR & more. OAuth with auto-registration or API key.
PDF tools + QR over MCP: merge, split, rotate, text, metadata, malicious-content scan.
Document processing over MCP: merge, split and compress PDFs, run OCR, extract document text.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered PDF manipulation through natural language commands, integrating with Claude to perform operations like merging, splitting, encrypting, optimizing, and analyzing PDFs.16-

gurupdf-mcpofficial
AlicenseAqualityBmaintenanceConvert, compress, merge, split and OCR PDFs plus 100+ file formats (Word, Excel, images, ebooks, video) right inside your AI agent. Exposes 126 GuruPDF tools over MCP — works with Claude, Cursor, VS Code, Windsurf, or any MCP client.4224 npm2MIT- FlicenseNot gradedqualityBmaintenanceEnables AI agents to perform 13 PDF operations (merge, split, compress, watermark, encrypt, and more) on local files via MCP.3-
- AlicenseCqualityDmaintenanceEnables AI assistants to perform PDF operations like merge, split, compress, convert, encrypt, OCR, and summarize using natural language.9811 npmMIT