SuperAPI AI Directory

mcp-pdf

mcp-pdf is a PDF tool server based on the Model Context Protocol (MCP), implemented in pure JavaScript, and can run locally or in a hosted environment. It provides capabilities such as merging, splitting, rotating, extracting/reordering pages, adding text watermarks (such as PAID, DRAFT), reading PDF text, and counting pages, and supports reading AcroForm form field values. The tool can be used with MCP clients such as Claude Desktop, Claude Code, and Cursor to complete PDF processing through natural language instructions. All operations are performed on the user's machine; files are not uploaded and no network requests are made (except in hosted mode). The project uses the MIT license and requires Node.js >= 18.

Open website

About this tool

mcp-pdf is a Model Context Protocol (MCP) server for PDF processing, designed to let users complete common small PDF tasks through chat instructions without uploading files to third-party websites. It is written in pure JavaScript, does not depend on native modules, can run locally, and also provides a hosted remote endpoint.

Main capabilities include: merging multiple PDFs; splitting by page range; extracting or reordering pages; rotating scanned documents (recording page metadata in multiples of 90 degrees); adding text watermarks on pages (such as PAID, DRAFT, or custom text), where the watermark is selectable, searchable drawn text rather than a flattened image; adding a company name and VAT number in the footer; counting pages across multiple files in a folder; and reading PDF text content. In addition, pdf_text prints AcroForm form field values, but the tool does not fill forms.

Usage: Users can configure mcp-pdf in Claude Desktop, Claude Code, Cursor, or other MCP clients. Installation methods include: downloading the .mcpb one-click package and double-clicking to install; cloning from source and building (dependencies are bundled, no additional setup required); or using the hosted endpoint (a token is required, passed via Authorization: Bearer or in the path). Note that the npm package @theluckystrike/mcp-pdf has not yet been published, so the npx command is not currently available.

Use cases: freelancers or small businesses handling PDF chores such as invoices, contracts, and scanned documents; marking invoices as PAID; merging resumes, cover letters, and portfolios; splitting large documents; reading PDF text content for subsequent processing.

Limitations and notes: pdf_text is best-effort text extraction, does not support OCR, and scanned documents return no text; custom or CID-encoded fonts may return glyph indices instead of letters; reading order is drawing order, with no layout reconstruction; encrypted PDFs are rejected; input files over 100 MB are rejected; output files by default do not overwrite existing files and require explicitly setting overwrite: true; the output path cannot be the same as the input file; watermark text only supports the WinAnsi character set and does not support CJK characters; page numbering, signatures, redaction, compression, PDF/A writing, and other features are not provided; forms are read-only and not filled. All data remains local, and the servicedoes not make any network requests (except in hosted mode).