PDF4me MCP Server
PDF4me MCP Server provides PDF4me API functionality through the Model Context Protocol (MCP), enabling AI assistants to easily perform a wide range of PDF, document, image, and barcode processing tasks.
π Key Features
π PDF Conversion
- PDF β Office: Convert PDFs to Word (DOCX), Excel (XLSX), PowerPoint (PPTX)
- PDF β Other Formats: Convert PDFs to PDF/A, searchable OCR PDF, HTML, Markdown
- Office β PDF: Convert DOCX, PPTX, XLSX, CSV, HTML, Markdown, Visio, and images to PDF
- Word β PDF Form: Convert Word documents into fillable PDF forms
- JSON β Excel: Convert JSON data files into Excel workbooks
π οΈ PDF Editing & Modification
- Stamps & Watermarks: Add text or image stamps/watermarks to PDFs
- Headers & Footers: Inject HTML-based headers and footers
- Annotations: Add page numbers, margins, hyperlink annotations
- Attachments: Embed any file as an attachment inside a PDF
- Signing: Apply signature images to PDF pages
- Find & Replace: Search and replace text, or replace text with images
π PDF Organization
- Merge: Combine multiple PDFs or overlay two PDFs
- Split: Split by page, page range, barcode, Swiss QR code, or matching text
- Delete / Extract: Remove or extract specific pages, delete blank pages
- Rotate: Rotate all pages or selected pages of a PDF
π PDF Extraction & Analysis
- Form Data: Extract values from fillable PDF form fields
- Tables: Detect and extract tables with coordinates
- Text: Extract text by regex expression; find and replace text
- Attachments: Pull embedded file attachments out of a PDF
- Resources: Extract text and images from PDF content
- Classification: Classify a PDF by document type, category, and confidence
π€ AI Document Processing
- Invoices, Orders, Receipts: Structured data extraction using AI
- Bank Statements & Cheques: Parse financial documents automatically
- Contracts & Mortgage Documents: Extract key fields from legal documents
- Tax Documents & Pay Stubs: Parse tax forms and payroll documents
- ID & Cards: Process health cards, credit cards, marriage certificates, and shipping labels
- Universal Extraction: Generic AI data extraction from any document type
π·οΈ Barcode & QR Codes
- Create: Generate barcodes and QR codes (PNG)
- Add to PDF: Stamp a barcode or QR code onto PDF pages
- Read from PDF / Image: Detect and decode barcodes and QR codes
- Swiss QR Bill: Create and read Swiss QR Bill payment sections; split PDFs by Swiss QR
πΌοΈ Image Processing
- Format Conversion: Convert between BMP, GIF, JPG, PNG, TIFF
- Editing: Resize, rotate, flip, and crop images
- Watermarks: Add image or text watermarks to images
- OCR: Extract text from images using OCR
- Metadata: Read or strip EXIF metadata
- Compression: Compress images with configurable quality levels
π Word & Document Tools
- Track Changes: Enable, disable, or extract tracked changes in Word documents
- Replace Text with Image: Substitute text placeholders with images in Word
- Extract Text: Pull text from Word documents with header/footer and comment control
π¦ Document Generation
- Single Document: Generate one document from a template and data (JSON, XML, or plain text)
- Batch Documents: Generate multiple documents from a single template and dataset
π Security
- Protect PDF: Apply password protection with configurable permissions
- Unlock PDF: Remove password protection from a PDF
- ZUGFeRD Invoice: Create standards-compliant ZUGFeRD e-invoices (XML or PDF+XML)
βοΈ Utilities
- Upload File: Upload local files to PDF4me cloud storage
- PDF Metadata: Read full metadata (title, author, page count, security info, dates)
- Image Metadata: Read image properties and EXIF fields
- Repair PDF: Repair corrupted or malformed PDFs
- Optimize PDF: Compress, linearize (web-optimize), or flatten PDFs
βοΈ Configuration
π Get API Key
- Sign up at dev.pdf4me.com
- Get your API key from the dashboard
π¦ Install UV
You need UV (a fast Python packaging tool) to run this MCP server.
macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Alternative methods
# Homebrew (macOS)
brew install uv
# pipx
pipx install uv
# pip
pip install uv
For more options, see the UV installation guide.
π§ MCP Client Setup
Cursor
Open Cursor Settings β MCP, or edit ~/.cursor/mcp.json (macOS/Linux) / %USERPROFILE%\.cursor\mcp.json (Windows):
{
"mcpServers": {
"pdf4me-mcp": {
"command": "uvx",
"args": ["pdf4me-mcp"],
"env": {
"PDF4ME_API_KEY": "your-api-key-here"
}
}
}
}
Claude Desktop
Open the Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"pdf4me-mcp": {
"command": "uvx",
"args": ["pdf4me-mcp"],
"env": {
"PDF4ME_API_KEY": "your-api-key-here"
}
}
}
}
VS Code
Open ~/.config/Code/User/mcp.json (macOS/Linux) or %APPDATA%\Code\User\mcp.json (Windows):
{
"servers": {
"pdf4me-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["pdf4me-mcp"],
"env": {
"PDF4ME_API_KEY": "your-api-key-here"
}
}
}
}
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"pdf4me-mcp": {
"command": "uvx",
"args": ["pdf4me-mcp"],
"env": {
"PDF4ME_API_KEY": "your-api-key-here"
}
}
}
}
Continue (VS Code / JetBrains extension)
Add to your ~/.continue/config.json:
{
"mcpServers": [
{
"name": "pdf4me-mcp",
"command": "uvx",
"args": ["pdf4me-mcp"],
"env": {
"PDF4ME_API_KEY": "your-api-key-here"
}
}
]
}
πͺ Windows Note
On Windows, uvx may need to be called with its full path if it is not on your PATH. Replace "command": "uvx" with the full path, e.g.:
"command": "C:\\Users\\<YourUser>\\.local\\bin\\uvx"
π οΈ Available Tools
π·οΈ Barcode Tools
| Tool | Description |
|---|
add_barcode_to_pdf | Draw a barcode or QR code onto PDF pages with configurable alignment and size |
create_barcode | Generate a barcode or QR code as a PNG image (supports Code128, QR, and more) |
read_barcodes | Read and decode barcode/QR data from a local PDF with barcode type and page filtering |
read_barcodes_from_image | Detect and decode barcodes and QR codes from a local image file |
create_swiss_qr_bill | Add a Swiss QR Bill payment section to a PDF (IBAN, creditor details, currency, reference) |
read_swiss_qr_bill | Parse and extract Swiss QR Bill payment data from a local PDF |
split_pdf_by_barcode | Split a PDF into multiple files at pages that contain a specific barcode value or type |
split_pdf_by_swiss_qr | Split a PDF by Swiss QR code positions into separate PDF files or a ZIP archive |
π Conversion Tools
| Tool | Description |
|---|
convert_to_pdf | Convert documents (DOCX, PPTX, XLSX, images, text formats) to PDF |
convert_html_to_pdf | Convert a local HTML file to PDF with layout, margins, and print options |
convert_url_to_pdf | Convert a web page URL to PDF with auth, layout, and margin settings |
convert_md_to_pdf | Convert a local Markdown file to PDF |
convert_visio_to_pdf | Convert a Visio file (.vsdx/.vsd/.vsdm) to PDF |
convert_word_to_pdf_form | Convert a Word document (DOCX) into a fillable PDF form |
convert_pdf_to_word | Convert a PDF to DOCX with quality settings, language, and optional OCR |
convert_pdf_to_excel | Convert a PDF to XLSX with quality, merge sheets, language, and optional OCR |
convert_pdf_to_powerpoint | Convert a PDF to PPTX with quality, language, and optional OCR |
convert_pdf_to_pdfa | Convert a PDF to PDF/A (PdfA1a through PdfA3u) with upgrade/downgrade control |
convert_ocr_pdf | Make a scanned PDF searchable by running OCR and embedding a text layer |
convert_json_to_excel | Convert a local JSON file to an Excel workbook (XLSX) with worksheet name and title options |
convert_image_format | Convert images between BMP, GIF, JPG, PNG, and TIFF formats |
flatten_pdf | Flatten a PDF (merge form fields and annotations into the page content) |
linearize_pdf | Linearize (web-optimize) a PDF for fast browser loading with configurable optimization presets |
βοΈ PDF Editing Tools