ilovepdf-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., "@ilovepdf-mcp Merge file1.pdf and file2.pdf"
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.
iLovePDF MCP Server
An MCP (Model Context Protocol) server that exposes iLovePDF API operations as tools for LLM clients like Claude. Process PDFs directly from your AI conversations - merge, split, compress, convert, and more.
Features
22 PDF tools covering all major PDF operations
Supports both local files and URLs as input
Customizable output with user-specified directories and filenames
Operation chaining for complex workflows
Full TypeScript support with type definitions
Related MCP server: PDF2MD MCP Server
Available Tools
Core Operations
Tool | Description |
| Merge multiple PDF files into one |
| Split PDF by page ranges, fixed intervals, or remove pages |
| Reduce PDF file size (low/recommended/extreme) |
| Rotate pages by 90, 180, or 270 degrees |
| Add password protection |
| Remove password protection |
| Repair damaged PDFs |
Conversion Operations
Tool | Description |
| Convert PDF pages to JPG images |
| Convert images to PDF |
| Convert webpages to PDF |
| Convert Word, Excel, PowerPoint to PDF |
| Convert to PDF/A archive format |
| Validate PDF/A compliance |
Enhancement Operations
Tool | Description |
| Add text or image watermarks |
| Add page numbers with custom formatting |
| Extract text content from PDF |
| OCR scanned PDFs (100+ languages) |
| Add text or images to specific positions |
Signature Operations
Tool | Description |
| Create digital signature requests |
| Check signature request status |
| Cancel pending signature requests |
Utility Operations
Tool | Description |
| Chain multiple operations together |
| List recent API tasks |
| Check API quota |
Installation
Prerequisites
Node.js 18 or higher
iLovePDF API credentials (get them at developer.ilovepdf.com)
Install from npm
npm install -g ilovepdf-mcpInstall from source
git clone https://github.com/yourusername/ilovepdf-mcp.git
cd ilovepdf-mcp
npm install
npm run buildConfiguration
Environment Variables
Create a .env file in your project root:
ILOVEPDF_PUBLIC_KEY=your_public_key_here
ILOVEPDF_SECRET_KEY=your_secret_key_here
DEFAULT_OUTPUT_DIR=./outputOr set environment variables directly in your shell.
Claude Desktop Integration
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Option 1: Using .env file (recommended)
If you've set up your .env file with API keys, you only need:
{
"mcpServers": {
"ilovepdf": {
"command": "node",
"args": ["/path/to/ilovepdf-mcp/dist/index.js"]
}
}
}Option 2: Keys in config only
If you prefer not to use a .env file:
{
"mcpServers": {
"ilovepdf": {
"command": "node",
"args": ["/path/to/ilovepdf-mcp/dist/index.js"],
"env": {
"ILOVEPDF_PUBLIC_KEY": "your_public_key",
"ILOVEPDF_SECRET_KEY": "your_secret_key",
"DEFAULT_OUTPUT_DIR": "/path/to/output"
}
}
}
}If installed globally via npm:
{
"mcpServers": {
"ilovepdf": {
"command": "ilovepdf-mcp"
}
}
}Usage Examples
Once configured, you can use natural language in Claude to process PDFs:
Merge PDFs
"Merge these three PDF files: report1.pdf, report2.pdf, and appendix.pdf"
Compress PDF
"Compress my large-document.pdf using extreme compression"
Convert to Images
"Convert this PDF to JPG images at 300 DPI"
Add Watermark
"Add a 'CONFIDENTIAL' watermark to all pages of contract.pdf"
Chain Operations
"Compress then merge these PDFs: file1.pdf, file2.pdf, file3.pdf"
OCR
"Make this scanned PDF searchable using English and Spanish OCR"
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev
# Clean build artifacts
npm run cleanAPI Reference
Common Parameters
Most tools accept these common parameters:
Parameter | Type | Description |
| string / string[] | Input file path(s) or URL(s) |
| string? | Output directory (default: |
| string? | Custom output filename |
Response Format
All tools return a consistent JSON response:
{
"success": true,
"message": "Operation completed successfully",
"outputPath": "/path/to/output.pdf",
"details": {
"originalSize": "5.2 MB",
"outputSize": "1.3 MB"
}
}On error:
{
"success": false,
"error": "Error message describing what went wrong"
}Troubleshooting
"Missing iLovePDF API credentials"
Ensure ILOVEPDF_PUBLIC_KEY and ILOVEPDF_SECRET_KEY are set in your environment or .env file.
"File not found"
Check the file path is correct and accessible
For URLs, ensure they are publicly accessible
"API quota exceeded"
Use get-remaining-files to check your quota. Upgrade your iLovePDF plan if needed.
License
MIT
Credits
iLovePDF for their excellent PDF API
Model Context Protocol for the MCP specification
Built with @modelcontextprotocol/sdk
Available Tools
24 toolsadd-page-numbersB
Add page numbers to a PDF document
Inputs: file (required), text, pages, fontSize, +10 more.
add-watermarkB
Add a text or image watermark to a PDF document
Inputs: file (required), mode (required), text, image, +13 more.
chain-operationsB
Chain multiple PDF operations together (e.g., compress then merge, or split then protect)
Inputs: file (required), operations (required), outputDir, outputFilename.
compress-pdfB
Reduce the file size of a PDF document while maintaining quality
Inputs: file (required), outputDir, outputFilename, compressionLevel.
convert-to-pdfaA
Convert a PDF to PDF/A format for long-term archiving
Inputs: file (required), outputDir, conformance, allowDowngrade, +1 more.
edit-pdfC
Add text or images to specific positions in a PDF document
Inputs: file (required), elements (required), outputDir, outputFilename.
extract-textC
Extract text content from a PDF document
Inputs: file (required), byWord, detailed, outputDir, +1 more.
get-remaining-filesA
Check how many API file operations remain in your iLovePDF quota
Inputs: no named parameters.
get-signature-statusB
Get the status of a signature request
Inputs: signatureToken (required).
html-to-pdfB
Convert a webpage URL to a PDF document
Inputs: url (required), delay, margin, pageSize, +8 more.
images-to-pdfB
Convert images (JPG, PNG, etc.) to a PDF document
Inputs: files (required), margin, pagesize, outputDir, +3 more.
list-tasksB
List recent PDF processing tasks from your iLovePDF account
Inputs: page, tool, status.
merge-pdfsA
Merge multiple PDF files into a single PDF document
Inputs: files (required), outputDir, outputFilename.
ocr-pdfA
Perform OCR (Optical Character Recognition) on a scanned PDF to make it searchable
Inputs: file (required), languages, outputDir, outputFilename.
office-to-pdfB
Convert Microsoft Office documents (Word, Excel, PowerPoint) to PDF
Inputs: file (required), outputDir, outputFilename.
pdf-to-jpgB
Convert PDF pages to JPG images
Inputs: file (required), dpi, mode, outputDir, +1 more.
protect-pdfB
Add password protection to a PDF document
Inputs: file (required), password (required), outputDir, outputFilename.
repair-pdfB
Attempt to repair a damaged or corrupted PDF document
Inputs: file (required), outputDir, outputFilename.
rotate-pdfB
Rotate all pages in a PDF document by a specified angle
Inputs: file (required), rotation (required), outputDir, outputFilename.
sign-pdfA
Create a digital signature request for a PDF document (sends signature requests via email)
Inputs: file (required), signers (required), language, brandLogo, +6 more.
split-pdfB
Split a PDF file into multiple documents based on page ranges or fixed intervals
Inputs: file (required), splitMode (required), ranges, outputDir, +3 more.
unlock-pdfB
Remove password protection from a PDF document
Inputs: file (required), password (required), outputDir, outputFilename.
validate-pdfaB
Validate if a PDF conforms to PDF/A standards
Inputs: file (required), conformance.
void-signatureB
Void/cancel a pending signature request
Inputs: signatureToken (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool targets a distinct PDF operation or resource, from rotation and conversion to security and e-signatures. There is minimal overlap; even similar functions like extract-text and ocr-pdf address different input types.
Tool names follow a consistent lowercase-hyphenated verb-first pattern (e.g., rotate-pdf, compress-pdf, add-watermark). Minor inconsistencies include pluralization (merge-pdfs vs. rotate-pdf) and the use of 'to-pdf' for conversions, but overall the pattern is predictable.
With 24 tools, the set is on the heavier side, which falls into the borderline category. However, each tool addresses a specific PDF workflow need, so the count is arguably justified for a comprehensive PDF service.
The server covers an extensive range of PDF operations: conversion, page manipulation, security, compression, repair, OCR, text extraction, editing, e-signatures, PDF/A handling, and task management. There are no obvious dead ends, and the surface appears complete for typical PDF workflows.
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for Api2Pdf — generate PDFs & images from HTML, URLs or office files; merge, barcodes.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis MCP server enables interactions with the PDF Generator API for creating, converting, and managing PDF documents using natural language commands.-
- AlicenseAqualityDmaintenanceAn MCP server that converts PDF files to Markdown format using AI sampling capabilities, supporting both local files and URLs with incremental conversion features.11MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to read, search, and analyze PDF files from local paths or URLs. It provides tools for extracting specific page ranges, searching for terms, and retrieving document metadata.439 npm1MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables interaction with the PDF Generator API for automated document generation and management. It supports both stdio and HTTP transports, allowing AI models to create and handle PDFs using OpenAPI v4 specifications.1MIT