{
  "markdown": "# PDF4me MCP Server\n\n<!-- mcp-name: io.github.pdf4me/pdf4me-mcp -->\n\nPDF4me MCP Server provides <a href=\"https://dev.pdf4me.com\" target=\"_blank\" rel=\"noopener noreferrer\">PDF4me API</a> functionality through the Model Context Protocol (MCP), enabling AI assistants to easily perform a wide range of PDF, document, image, and barcode processing tasks.\n\n---\n\n## 🚀 Key Features\n\n### 📄 PDF Conversion\n- **PDF → Office**: Convert PDFs to Word (DOCX), Excel (XLSX), PowerPoint (PPTX)\n- **PDF → Other Formats**: Convert PDFs to PDF/A, searchable OCR PDF, HTML, Markdown\n- **Office → PDF**: Convert DOCX, PPTX, XLSX, CSV, HTML, Markdown, Visio, and images to PDF\n- **Word → PDF Form**: Convert Word documents into fillable PDF forms\n- **JSON → Excel**: Convert JSON data files into Excel workbooks\n\n### 🛠️ PDF Editing & Modification\n- **Stamps & Watermarks**: Add text or image stamps/watermarks to PDFs\n- **Headers & Footers**: Inject HTML-based headers and footers\n- **Annotations**: Add page numbers, margins, hyperlink annotations\n- **Attachments**: Embed any file as an attachment inside a PDF\n- **Signing**: Apply signature images to PDF pages\n- **Find & Replace**: Search and replace text, or replace text with images\n\n### 📐 PDF Organization\n- **Merge**: Combine multiple PDFs or overlay two PDFs\n- **Split**: Split by page, page range, barcode, Swiss QR code, or matching text\n- **Delete / Extract**: Remove or extract specific pages, delete blank pages\n- **Rotate**: Rotate all pages or selected pages of a PDF\n\n### 🔍 PDF Extraction & Analysis\n- **Form Data**: Extract values from fillable PDF form fields\n- **Tables**: Detect and extract tables with coordinates\n- **Text**: Extract text by regex expression; find and replace text\n- **Attachments**: Pull embedded file attachments out of a PDF\n- **Resources**: Extract text and images from PDF content\n- **Classification**: Classify a PDF by document type, category, and confidence\n\n### 🤖 AI Document Processing\n- **Invoices, Orders, Receipts**: Structured data extraction using AI\n- **Bank Statements & Cheques**: Parse financial documents automatically\n- **Contracts & Mortgage Documents**: Extract key fields from legal documents\n- **Tax Documents & Pay Stubs**: Parse tax forms and payroll documents\n- **ID & Cards**: Process health cards, credit cards, marriage certificates, and shipping labels\n- **Universal Extraction**: Generic AI data extraction from any document type\n\n### 🏷️ Barcode & QR Codes\n- **Create**: Generate barcodes and QR codes (PNG)\n- **Add to PDF**: Stamp a barcode or QR code onto PDF pages\n- **Read from PDF / Image**: Detect and decode barcodes and QR codes\n- **Swiss QR Bill**: Create and read Swiss QR Bill payment sections; split PDFs by Swiss QR\n\n### 🖼️ Image Processing\n- **Format Conversion**: Convert between BMP, GIF, JPG, PNG, TIFF\n- **Editing**: Resize, rotate, flip, and crop images\n- **Watermarks**: Add image or text watermarks to images\n- **OCR**: Extract text from images using OCR\n- **Metadata**: Read or strip EXIF metadata\n- **Compression**: Compress images with configurable quality levels\n\n### 📝 Word & Document Tools\n- **Track Changes**: Enable, disable, or extract tracked changes in Word documents\n- **Replace Text with Image**: Substitute text placeholders with images in Word\n- **Extract Text**: Pull text from Word documents with header/footer and comment control\n\n### 📦 Document Generation\n- **Single Document**: Generate one document from a template and data (JSON, XML, or plain text)\n- **Batch Documents**: Generate multiple documents from a single template and dataset\n\n### 🔒 Security\n- **Protect PDF**: Apply password protection with configurable permissions\n- **Unlock PDF**: Remove password protection from a PDF\n- **ZUGFeRD Invoice**: Create standards-compliant ZUGFeRD e-invoices (XML or PDF+XML)\n\n### ⚙️ Utilities\n- **Upload File**: Upload local files to PDF4me cloud storage\n- **PDF Metadata**: Read full metadata (title, author, page count, security info, dates)\n- **Image Metadata**: Read image properties and EXIF fields\n- **Repair PDF**: Repair corrupted or malformed PDFs\n- **Optimize PDF**: Compress, linearize (web-optimize), or flatten PDFs\n\n---\n\n## ⚙️ Configuration\n\n### 🔑 Get API Key\n\n1. Sign up at <a href=\"https://dev.pdf4me.com\" target=\"_blank\" rel=\"noopener noreferrer\">dev.pdf4me.com</a>\n2. Get your API key from the dashboard\n\n### 📦 Install UV\n\nYou need <a href=\"https://docs.astral.sh/uv/\" target=\"_blank\" rel=\"noopener noreferrer\">UV</a> (a fast Python packaging tool) to run this MCP server.\n\n**macOS / Linux**\n\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n**Windows (PowerShell)**\n\n```powershell\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n\n**Alternative methods**\n\n```bash\n# Homebrew (macOS)\nbrew install uv\n\n# pipx\npipx install uv\n\n# pip\npip install uv\n```\n\nFor more options, see the <a href=\"https://docs.astral.sh/uv/getting-started/installation/\" target=\"_blank\" rel=\"noopener noreferrer\">UV installation guide</a>.\n\n---\n\n## 🔧 MCP Client Setup\n\n### Cursor\n\nOpen Cursor Settings → MCP, or edit `~/.cursor/mcp.json` (macOS/Linux) / `%USERPROFILE%\\.cursor\\mcp.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"pdf4me-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pdf4me-mcp\"],\n      \"env\": {\n        \"PDF4ME_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nOpen the Claude Desktop config file:\n\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **Linux**: `~/.config/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"pdf4me-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pdf4me-mcp\"],\n      \"env\": {\n        \"PDF4ME_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n### VS Code\n\nOpen `~/.config/Code/User/mcp.json` (macOS/Linux) or `%APPDATA%\\Code\\User\\mcp.json` (Windows):\n\n```json\n{\n  \"servers\": {\n    \"pdf4me-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"pdf4me-mcp\"],\n      \"env\": {\n        \"PDF4ME_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n### Windsurf\n\nEdit `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pdf4me-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pdf4me-mcp\"],\n      \"env\": {\n        \"PDF4ME_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n### Continue (VS Code / JetBrains extension)\n\nAdd to your `~/.continue/config.json`:\n\n```json\n{\n  \"mcpServers\": [\n    {\n      \"name\": \"pdf4me-mcp\",\n      \"command\": \"uvx\",\n      \"args\": [\"pdf4me-mcp\"],\n      \"env\": {\n        \"PDF4ME_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  ]\n}\n```\n\n---\n\n## 🪟 Windows Note\n\nOn 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.:\n\n```json\n\"command\": \"C:\\\\Users\\\\<YourUser>\\\\.local\\\\bin\\\\uvx\"\n```\n\n---\n\n## 🛠️ Available Tools\n\n### 🏷️ Barcode Tools\n\n| Tool | Description |\n|------|-------------|\n| `add_barcode_to_pdf` | Draw a barcode or QR code onto PDF pages with configurable alignment and size |\n| `create_barcode` | Generate a barcode or QR code as a PNG image (supports Code128, QR, and more) |\n| `read_barcodes` | Read and decode barcode/QR data from a local PDF with barcode type and page filtering |\n| `read_barcodes_from_image` | Detect and decode barcodes and QR codes from a local image file |\n| `create_swiss_qr_bill` | Add a Swiss QR Bill payment section to a PDF (IBAN, creditor details, currency, reference) |\n| `read_swiss_qr_bill` | Parse and extract Swiss QR Bill payment data from a local PDF |\n| `split_pdf_by_barcode` | Split a PDF into multiple files at pages that contain a specific barcode value or type |\n| `split_pdf_by_swiss_qr` | Split a PDF by Swiss QR code positions into separate PDF files or a ZIP archive |\n\n---\n\n### 🔄 Conversion Tools\n\n| Tool | Description |\n|------|-------------|\n| `convert_to_pdf` | Convert documents (DOCX, PPTX, XLSX, images, text formats) to PDF |\n| `convert_html_to_pdf` | Convert a local HTML file to PDF with layout, margins, and print options |\n| `convert_url_to_pdf` | Convert a web page URL to PDF with auth, layout, and margin settings |\n| `convert_md_to_pdf` | Convert a local Markdown file to PDF |\n| `convert_visio_to_pdf` | Convert a Visio file (.vsdx/.vsd/.vsdm) to PDF |\n| `convert_word_to_pdf_form` | Convert a Word document (DOCX) into a fillable PDF form |\n| `convert_pdf_to_word` | Convert a PDF to DOCX with quality settings, language, and optional OCR |\n| `convert_pdf_to_excel` | Convert a PDF to XLSX with quality, merge sheets, language, and optional OCR |\n| `convert_pdf_to_powerpoint` | Convert a PDF to PPTX with quality, language, and optional OCR |\n| `convert_pdf_to_pdfa` | Convert a PDF to PDF/A (PdfA1a through PdfA3u) with upgrade/downgrade control |\n| `convert_ocr_pdf` | Make a scanned PDF searchable by running OCR and embedding a text layer |\n| `convert_json_to_excel` | Convert a local JSON file to an Excel workbook (XLSX) with worksheet name and title options |\n| `convert_image_format` | Convert images between BMP, GIF, JPG, PNG, and TIFF formats |\n| `flatten_pdf` | Flatten a PDF (merge form fields and annotations into the page content) |\n| `linearize_pdf` | Linearize (web-optimize) a PDF for fast browser loading with configurable optimization presets |\n\n---\n\n### ✏️ PDF Editing Tools\n\n| Tool | Description |\n|------|-------------|\n| `add_attachment_to_pdf` | Embed one or more files as attachments inside a PDF |\n| `add_html_header_footer_to_pdf` | Add an HTML-formatted header, footer, or both to PDF pages |\n| `add_margin_to_pdf` | Add page margins (in millimeters) to all pages of a PDF |\n| `add_page_number_to_pdf` | Insert page numbers with configurable alignment, format, and font styling |\n| `add_image_stamp_to_pdf` | Place an image stamp or watermark on PDF pages with alignment, opacity, and size controls |\n| `add_text_stamp_to_pdf` | Place a text stamp or watermark on PDF pages with font, opacity, rotation, and alignment options |\n| `sign_pdf` | Apply a signature image to a PDF with layout and margin options |\n| `find_and_replace_text` | Find and replace text across PDF pages |\n| `replace_text_with_image` | Replace text occurrences in a PDF with an image at configurable dimensions |\n| `update_hyperlink_annotation` | Update or replace hyperlink annotations in a PDF by search criteria |\n| `repair_pdf` | Repair a corrupted or malformed PDF file |\n\n---\n\n### 📤 Extract Tools\n\n| Tool | Description |\n|------|-------------|\n| `extract_pages_from_pdf` | Extract specific pages from a PDF into a new PDF file |\n| `extract_form_data_from_pdf` | Extract all form field names and their current values from a PDF |\n| `extract_attachment_from_pdf` | Extract embedded file attachments from a PDF and save them to disk |\n| `extract_resources` | Extract text content and images embedded in a PDF |\n| `extract_table_from_pdf` | Detect and extract tables from a PDF, saving results as JSON and CSV |\n| `extract_text_by_expression` | Extract text from a PDF using a regular expression pattern |\n| `extract_text_from_word` | Extract text from a Word document, with options to remove headers, footers, or comments |\n| `extract_text_from_image` | Extract text from an image using OCR |\n| `classify_document` | Classify a PDF by document type and category with a confidence score |\n| `parse_document` | Extract structured data from a PDF using a predefined PDF4me parsing template |\n\n---\n\n### 📋 Forms Tools\n\n| Tool | Description |\n|------|-------------|\n| `add_form_fields_to_pdf` | Add new TextBox or CheckBox form fields to a PDF at specified coordinates |\n| `fill_pdf_form` | Fill existing form fields in a PDF using a key/value data map |\n\n---\n\n### 📝 Document Generation Tools\n\n| Tool | Description |\n|------|-------------|\n| `generate_document_single` | Generate one document from a template (DOCX/HTML/PDF) and a data payload (JSON/XML/text) |\n| `generate_documents_multiple` | Generate multiple documents in batch from one template and a multi-record dataset |\n| `enable_tracking_changes_in_word` | Enable Track Changes mode in a Word document |\n| `disable_tracking_changes_in_word` | Disable Track Changes mode in a Word document |\n| `get_tracking_changes_in_word` | Extract all tracked change data from a Word document as structured JSON |\n| `replace_text_with_image_in_word` | Replace text placeholders in a Word document with an image |\n\n---\n\n### 🖼️ Image Tools\n\n| Tool | Description |\n|------|-------------|\n| `add_image_watermark_to_image` | Overlay a watermark image onto another image with opacity and position controls |\n| `add_text_watermark_to_image` | Add a text watermark to an image with font, color, opacity, and rotation options |\n| `compress_image` | Compress a JPG, PNG, or WebP image with configurable compression level |\n| `convert_image_format` | Convert an image between BMP, GIF, JPG, PNG, and TIFF formats |\n| `create_images_from_pdf` | Render PDF pages to image files (JPEG, PNG, TIFF) with page selection and width options |\n| `crop_image` | Crop an image by border or by a specific rectangle region |\n| `flip_image` | Flip an image horizontally or vertically |\n| `get_image_metadata` | Extract image properties and EXIF metadata from a JPG or PNG file |\n| `extract_text_from_image` | Run OCR on an image to extract its text content |\n| `resize_image` | Resize an image by percentage or to specific dimensions, with aspect ratio control |\n| `rotate_image` | Rotate an image by a specified angle with background color and resize options |\n| `rotate_image_by_exif_data` | Auto-rotate an image to its correct orientation based on its EXIF metadata |\n| `remove_exif_tags_from_image` | Strip all EXIF metadata from a JPG or PNG image |\n\n---\n\n### 🔗 Merge & Split Tools\n\n| Tool | Description |\n|------|-------------|\n| `merge_multiple_pdfs` | Merge two or more PDF files into a single PDF |\n| `merge_pdf_overlay` | Overlay one PDF on top of another (e.g. stamp a letterhead) |\n| `split_pdf` | Split a PDF by page number, recurring interval, sequence, or page ranges |\n| `split_pdf_by_barcode` | Split a PDF at pages containing a specified barcode |\n| `split_pdf_by_swiss_qr` | Split a PDF at Swiss QR code positions |\n| `split_pdf_by_text` | Split a PDF at pages containing a specific text string |\n\n---\n\n### ⚡ Optimize Tools\n\n| Tool | Description |\n|------|-------------|\n| `compress_pdf` | Compress a PDF with optimization profiles for Web, Print, or Screen |\n| `delete_blank_pages_from_pdf` | Remove blank pages from a PDF (no text, no images, or both) |\n| `linearize_pdf` | Linearize a PDF for fast incremental loading in web browsers |\n\n---\n\n### 📂 Organize Tools\n\n| Tool | Description |\n|------|-------------|\n| `delete_pdf_pages` | Remove specific pages from a PDF by page number or range |\n| `extract_pages_from_pdf` | Extract selected pages from a PDF into a new file |\n| `rotate_pdf` | Rotate all pages of a PDF (Clockwise, CounterClockwise, UpsideDown) |\n| `rotate_pdf_page` | Rotate selected pages of a PDF independently |\n\n---\n\n### 📊 PDF Information Tools\n\n| Tool | Description |\n|------|-------------|\n| `get_pdf_metadata` | Read full PDF metadata: title, author, page count, security info, and dates |\n| `get_image_metadata` | Read image properties and available EXIF fields from a JPG or PNG |\n| `repair_pdf` | Attempt to repair a corrupted or malformed PDF |\n\n---\n\n### 🔒 Security Tools\n\n| Tool | Description |\n|------|-------------|\n| `protect_pdf` | Password-protect a PDF with configurable permissions (print, copy, edit, etc.) |\n| `unlock_pdf` | Remove password protection from a PDF using the current password |\n\n---\n\n### 🤖 AI Document Processing Tools\n\n| Tool | Description |\n|------|-------------|\n| `process_invoice` | Extract structured invoice data (line items, totals, dates, vendor info) from a PDF or image using AI |\n| `process_bank_cheque` | Parse bank cheque images and extract cheque details using AI |\n| `process_contract` | Extract key clauses and fields from contract documents using AI |\n| `process_credit_card` | Extract credit card information from card images using AI |\n| `process_health_card` | Extract data from health insurance card images using AI |\n| `process_marriage_certificate` | Extract fields from marriage certificates using AI, with optional authenticity verification |\n| `process_mortgage_document` | Extract key financial and property details from mortgage documents using AI |\n| `process_pay_stub` | Extract earnings, deductions, and employee details from pay stub documents using AI |\n| `process_bank_statement` | Parse bank statements for transactions, balances, and patterns using AI |\n| `process_order` | Extract order details (items, quantities, prices, addresses) from purchase order documents using AI |\n| `process_receipt` | Extract merchant info, line items, and totals from receipt images or PDFs using AI |\n| `process_shipping_label` | Extract carrier, tracking number, and address data from shipping labels using AI |\n| `process_tax_document` | Extract tax form fields and computed values from tax documents using AI |\n| `process_universal_document` | Extract any specified fields from any document type using AI (configurable field list) |\n\n---\n\n### 📜 ZUGFeRD / E-Invoice Tools\n\n| Tool | Description |\n|------|-------------|\n| `create_zugferd_invoice` | Create a ZUGFeRD-compliant e-invoice from XML, JSON, or CSV data — as PDF+XML or XML-only |\n\n---\n\n### 🗂️ File Management Tools\n\n| Tool | Description |\n|------|-------------|\n| `upload_file` | Upload a local file to PDF4me cloud storage and receive a file reference for further operations |\n| `get_document_from_pdf4me` | Register a webhook callback URL to receive documents from PDF4me |\n\n---\n\n## 💡 Usage Examples\n\n**Convert a PDF to Word:**\n```\nConvert this PDF to a Word document: /path/to/document.pdf\n```\n\n**Merge multiple PDFs:**\n```\nMerge these PDFs into one: report.pdf, appendix.pdf, cover.pdf\n```\n\n**Extract invoice data using AI:**\n```\nExtract all invoice details from this file: invoice.pdf\n```\n\n**Add a Swiss QR Bill to a PDF:**\n```\nAdd a Swiss QR Bill to invoice.pdf with IBAN CH93-0076-2011-6238-5295-7, creditor name \"Acme AG\"\n```\n\n**Split a PDF by barcode:**\n```\nSplit this PDF at every page containing a Code128 barcode: batch.pdf\n```\n\n**Generate a document from a template:**\n```\nGenerate a contract PDF from contract_template.docx with this data: {\"client\": \"ACME\", \"date\": \"2024-01-01\"}\n```\n\n**Compress an image:**\n```\nCompress this PNG image with maximum compression: photo.png\n```\n\n**OCR a scanned PDF:**\n```\nMake this scanned PDF searchable: scanned_report.pdf\n```\n\n---\n\n## 🛠️ Manual Run (without a client)\n\n```bash\nuvx pdf4me-mcp\n```\n\nOr, if installed locally:\n\n```bash\nPDF4ME_API_KEY=your-api-key-here pdf4me-mcp\n```\n\n---\n\n## 📞 Support & Contact\n\n- **PDF4me**: <a href=\"https://dev.pdf4me.com\" target=\"_blank\" rel=\"noopener noreferrer\">pdf4me.com</a>\n- **API Documentation**: <a href=\"https://docs.pdf4me.com\" target=\"_blank\" rel=\"noopener noreferrer\">docs.pdf4me.com</a>\n- **Issue Reports**: <a href=\"https://github.com/pdf4me/pdf4me-mcp/issues\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub Issues</a>\n\n---\n\n## 📄 License\n\nThis project is distributed under the MIT License.\n",
  "bytes": 19281,
  "sha": "713d3a2aa806791b478a19dc05e4c7a4beeec6993d0f1cf0c8ba690c34b0ead4",
  "repo_slug": "pdf4me/pdf4me-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pdf4me_pdf4me_mcp_c25675ea/readme"
}