{"_id":"@abhishektangudu/pdf-toolkit-mcp","_rev":"2-4145ff3d73144d0201c3759ef4b0968b","name":"@abhishektangudu/pdf-toolkit-mcp","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0":{"name":"@abhishektangudu/pdf-toolkit-mcp","version":"0.0.0","_id":"@abhishektangudu/pdf-toolkit-mcp@0.0.0","maintainers":[{"name":"abhishek-tangudu","email":"abhishek.tangudu@outlook.com"}],"homepage":"https://github.com/abhishektangudu/pdf-toolkit-mcp#readme","bugs":{"url":"https://github.com/abhishektangudu/pdf-toolkit-mcp/issues"},"dist":{"shasum":"24ac44762d0b31d9b9b335a2be13980d77c44257","tarball":"https://registry.npmjs.org/@abhishektangudu/pdf-toolkit-mcp/-/pdf-toolkit-mcp-0.0.0.tgz","fileCount":34,"integrity":"sha512-cQyiTG9kPBMaa0td1ogfl4NUxUlqnFH/3LHakxfjkBDeZrGXXKsTilSyx7OvzV7NCngK634Twi8pTQ8sXHdshg==","signatures":[{"sig":"MEQCIErU2MwI/SlqUuzyIgtx8L3PEu+rKOvVZjgAET8yXZpMAiAE/JIjVZOqjzjB1vGR+refBHyeWATDBDSgu6Tossp2kg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abhishektangudu%2fpdf-toolkit-mcp@0.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":393453},"type":"module","gitHead":"9352278f185b5d0205ef77e11fa23b3afca997de","scripts":{"dev":"tsx server.ts","mcp":"tsx src/mcp/cli.ts","eval":"tsx src/eval/cli-runner.ts","lint":"tsc --noEmit","build":"vite build && esbuild server.ts --bundle --platform=node --format=cjs --packages=external --sourcemap --outfile=dist/server.cjs","clean":"rm -rf dist server.js","start":"node dist/server.cjs","preview":"vite preview"},"_npmUser":{"name":"abhishek-tangudu","email":"abhishek.tangudu@outlook.com"},"repository":{"url":"git+https://github.com/abhishektangudu/pdf-toolkit-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"A comprehensive, privacy-first PDF manipulation suite and Model Context Protocol (MCP) server for AI Agents (Claude Desktop, Cursor, Windsurf, LangChain, Claude Code).","directories":{},"_nodeVersion":"20.20.2","dependencies":{"zod":"^4.4.3","vite":"^6.2.3","react":"^19.0.1","dotenv":"^17.2.3","motion":"^12.23.24","express":"^4.21.2","pdf-lib":"^1.17.1","react-dom":"^19.0.1","pdfjs-dist":"^6.2.108","lucide-react":"^0.546.0","@google/genai":"^2.4.0","@tailwindcss/vite":"^4.1.14","@vitejs/plugin-react":"^5.0.4","@modelcontextprotocol/sdk":"^1.30.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","vite":"^6.2.3","esbuild":"^0.25.0","typescript":"~5.8.2","@types/node":"^22.14.0","tailwindcss":"^4.1.14","autoprefixer":"^10.4.21","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/pdf-toolkit-mcp_0.0.0_1787737965290_0.6041660544997156","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@abhishektangudu/pdf-toolkit-mcp","version":"0.0.1","type":"module","repository":{"type":"git","url":"git+https://github.com/abhishektangudu/pdf-toolkit-mcp.git"},"scripts":{"dev":"tsx server.ts","build":"vite build && esbuild server.ts --bundle --platform=node --format=cjs --packages=external --sourcemap --outfile=dist/server.cjs","start":"node dist/server.cjs","mcp":"tsx src/mcp/cli.ts","eval":"tsx src/eval/cli-runner.ts","preview":"vite preview","clean":"rm -rf dist server.js","lint":"tsc --noEmit"},"dependencies":{"@google/genai":"^2.4.0","@modelcontextprotocol/sdk":"^1.30.0","@tailwindcss/vite":"^4.1.14","@vitejs/plugin-react":"^5.0.4","dotenv":"^17.2.3","express":"^4.21.2","lucide-react":"^0.546.0","motion":"^12.23.24","pdf-lib":"^1.17.1","pdfjs-dist":"^6.2.108","react":"^19.0.1","react-dom":"^19.0.1","vite":"^6.2.3","zod":"^4.4.3"},"devDependencies":{"@types/node":"^22.14.0","autoprefixer":"^10.4.21","esbuild":"^0.25.0","tailwindcss":"^4.1.14","tsx":"^4.21.0","typescript":"~5.8.2","vite":"^6.2.3","@types/express":"^4.17.21"},"_id":"@abhishektangudu/pdf-toolkit-mcp@0.0.1","gitHead":"14ae74eba33db324808e951b5acd33119b10b1d4","description":"A comprehensive, privacy-first PDF manipulation suite and Model Context Protocol (MCP) server for AI Agents (Claude Desktop, Cursor, Windsurf, LangChain, Claude Code).","bugs":{"url":"https://github.com/abhishektangudu/pdf-toolkit-mcp/issues"},"homepage":"https://github.com/abhishektangudu/pdf-toolkit-mcp#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-5ccF9nCBeukXVneOr0tClYSkdLfnNXq1jVZOoDCcsBkzvOmz/gQO1+Lytxcjn0ejNSSELkUUapmjtP9u76osBw==","shasum":"6dc2e2e7b77a136fe900ef2f19a78193921fad1e","tarball":"https://registry.npmjs.org/@abhishektangudu/pdf-toolkit-mcp/-/pdf-toolkit-mcp-0.0.1.tgz","fileCount":34,"unpackedSize":393453,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abhishektangudu%2fpdf-toolkit-mcp@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD3aGxTE1M4xFKpD86KR8aENLeWomlxbDWden0aLfgSZAIgVC+KWWWI3zAyT3cK8MNoruvwDKjQWmlzl0zEa1QW+1c="}]},"_npmUser":{"name":"abhishek-tangudu","email":"abhishek.tangudu@outlook.com"},"directories":{},"maintainers":[{"name":"abhishek-tangudu","email":"abhishek.tangudu@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdf-toolkit-mcp_0.0.1_1787776812321_0.129443174654027"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T09:52:45.030Z","modified":"2026-08-26T20:40:12.853Z","0.0.0":"2026-08-26T09:52:45.443Z","0.0.1":"2026-08-26T20:40:12.499Z"},"bugs":{"url":"https://github.com/abhishektangudu/pdf-toolkit-mcp/issues"},"homepage":"https://github.com/abhishektangudu/pdf-toolkit-mcp#readme","repository":{"type":"git","url":"git+https://github.com/abhishektangudu/pdf-toolkit-mcp.git"},"description":"A comprehensive, privacy-first PDF manipulation suite and Model Context Protocol (MCP) server for AI Agents (Claude Desktop, Cursor, Windsurf, LangChain, Claude Code).","maintainers":[{"name":"abhishek-tangudu","email":"abhishek.tangudu@outlook.com"}],"readme":"# PDF Agent Toolkit & MCP Server (inspired by ihatepdf.cv)\n\nA comprehensive, privacy-first PDF manipulation suite and Model Context Protocol (MCP) server for AI Agents (Claude Desktop, Cursor, Windsurf, LangChain, Claude Code).\n\n## Core Philosophy\n1. **Zero Cloud Uploads**: All PDF processing (compression, page reordering, rotation, redaction, and text extraction) executes 100% locally in pure TypeScript & WebAssembly.\n2. **Agent Token Optimization**: Eliminates context bloat by avoiding raw PDF base64 dumps in prompts; returns structured outlines and page snippets on demand.\n3. **Universal Compatibility**: Works out of the box with `stdio` JSON-RPC 2.0.\n\n---\n\n## 🛠️ Available MCP Tools\n\n| Tool Name | Category | Description | Agent Optimization |\n|---|---|---|---|\n| `compress_pdf` | Optimization | Reduces file size via stream defragmentation and DPI presets (`screen`, `ebook`, `printer`). | Reduces downstream OCR/vision token weight by up to 70%. |\n| `extract_pdf_content` | Intelligence | Extracts document TOC, outline, word count, and clean Markdown text. | Saves ~90% context tokens compared to raw stream dumping. |\n| `scan_and_redact_pii` | Security | Detects SSNs, Emails, Credit Cards, Aadhaar numbers, and custom keywords, stamping black redaction boxes. | Ensures GDPR/HIPAA compliance prior to sending docs to external LLMs. |\n| `organize_pdf` | Structure | Compound tool: reorders, deletes, rotates (90/180/270°), and adds page numbers in one atomic pass. | Prevents multi-turn roundtrips. |\n| `split_pdf` | Structure | Extracts specific page ranges (e.g. `\"1-3, 5, 8-12\"`). | Allows agents to inspect specific chapters. |\n| `merge_pdfs` | Structure | Combines multiple input PDFs into a single document. | Fast multi-file document compilation. |\n| `stamp_watermark` | Security | Stamps visual text watermarks (e.g. `\"DRAFT\"`, `\"CONFIDENTIAL\"`) with custom rotation and opacity. | Visual status stamping. |\n| `create_pdf_from_text` | Creation | Formats clean Markdown/text into an A4 PDF with stylized header banners. | Lightweight document generation without headless browser bloat. |\n| `inspect_and_fill_form` | Forms | Inspects AcroForm fields and fills form data. | Automates invoice, tax, and contract processing. |\n\n---\n\n## 🚀 Quickstart Configs for Agents\n\n### 1. Cursor IDE (`.cursor/mcp.json`)\n```json\n{\n  \"mcpServers\": {\n    \"pdf-agent-toolkit\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"pdf-agent-toolkit-mcp@latest\"]\n    }\n  }\n}\n```\n\n### 2. Claude Desktop (`claude_desktop_config.json`)\n```json\n{\n  \"mcpServers\": {\n    \"pdf-tools\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"pdf-agent-toolkit-mcp\"]\n    }\n  }\n}\n```\n\n### 3. LangChain & LangGraph (Python)\n```python\nfrom langchain_mcp_adapters.client import MultiServerMCPClient\nfrom langgraph.prebuilt import create_react_agent\nfrom langchain_google_genai import ChatGoogleGenerativeAI\n\nasync def main():\n    async with MultiServerMCPClient({\n        \"pdf_tools\": {\n            \"command\": \"npx\",\n            \"args\": [\"-y\", \"pdf-agent-toolkit-mcp\"],\n            \"transport\": \"stdio\",\n        }\n    }) as client:\n        tools = client.get_tools()\n        model = ChatGoogleGenerativeAI(model=\"gemini-2.5-flash\")\n        agent = create_react_agent(model, tools)\n        \n        response = await agent.ainvoke({\n            \"messages\": [(\"user\", \"Compress ./financials.pdf and blackout sensitive SSNs\")]\n        })\n        print(response)\n```\n\n---\n\n## 💻 Running the Server Locally\n```bash\n# Run MCP server on stdio\nnpm run mcp\n\n# Start the interactive visual testing studio and playground\nnpm run dev\n```\n","readmeFilename":"README.md"}