Give your AI agents professional PDF tools
The iLoveAPI MCP server lets Gemini, Claude and AI agents compress, merge, split, convert, OCR and watermark documents on your computer, powered by the same engines as the iLoveAPI REST API.
Open source (MIT). Runs locally with Node.js 18+. 2,500 free credits every month.
How it works
Your AI assistant chooses the tool, iLoveAPI does the processing, and the result lands in your folder.
Ask
Ask in plain language: "compress this contract and add a watermark".
Call
Your MCP client calls the right iLoveAPI tool with its options.
Process
iLoveAPI processes the file as an API task.
Save
The result is saved in your working folder.
Document tools your agent can use
Every tool runs on the same processing engines as the iLoveAPI REST API.
Compress PDF
Reduce the file size of a PDF. (ilovepdf_compress_pdf)
Merge PDF
Combine several PDFs into one, in the order you give. (ilovepdf_merge_pdf)
Split PDF
Split by page ranges or fixed chunks (saved as one .zip). (ilovepdf_split_pdf)
Office to PDF
Convert Word, Excel and PowerPoint files to PDF. (ilovepdf_office_to_pdf)
Image to PDF
Turn JPG, PNG and TIFF images into a PDF. (ilovepdf_image_to_pdf)
PDF to JPG
Export every page as a JPEG image (saved as one .zip). (ilovepdf_pdf_to_jpg)
OCR PDF
Make scanned PDFs searchable and selectable. (ilovepdf_pdf_ocr)
Watermark
Stamp a text or image watermark on every page. (ilovepdf_watermark)
Page numbers
Add page numbers with your own position and style. (ilovepdf_pagenumber)
Works with the AI tools you already use
Gemini, Claude and AI agents: any MCP client that supports the stdio transport can use it.
Learn more →iLovePDF in ChatGPT, Claude or Gemini for iLovePDF Premium accounts is a separate hosted connector (mcp.ilovepdf.com) with nothing to install.
Claude Desktop and Gemini CLI
Add the server to your client configuration and restart the client. The tools then appear in it.
Any MCP client
Standard MCP over stdio, so it works with any compatible client or agent framework.
Local files or URLs
Use files from your computer or public https:// links as inputs.
Up and running in three steps
No code to write: your AI assistant does the calling.
Get your key
Create a free account and copy your project public key from API keys.
project_public_…Add the server
Paste the configuration into Claude Desktop, Gemini CLI or your MCP client.
npx -y @ilovepdf/mcpAsk
"Merge these PDFs and add page numbers" and get the file back in your folder.
ilovepdf_merge_pdfSet it up in a couple of minutes
Pick your client and paste the configuration. Only your project public key is needed; the server starts even without it and asks for it on the first tool call.
// claude_desktop_config.json
// macOS: ~/Library/Application Support/Claude/
// Windows: %APPDATA%\Claude\
{
"mcpServers": {
"ilovepdf": {
"command": "npx",
"args": [
"-y",
"@ilovepdf/mcp"
],
"env": {
"ILOVEPDF_PUBLIC_KEY": "project_public_xxxxxxxx",
"ILOVEPDF_MCP_WORKDIR": "/Users/you/pdf-workspace"
}
}
}
}
// Gemini CLI: ~/.gemini/settings.json (global) or .gemini/settings.json (project)
{
"mcpServers": {
"ilovepdf": {
"command": "npx",
"args": [
"-y",
"@ilovepdf/mcp"
],
"env": {
"ILOVEPDF_PUBLIC_KEY": "project_public_xxxxxxxx"
}
}
}
}
// Any client that supports the stdio transport
{
"command": "npx",
"args": [
"-y",
"@ilovepdf/mcp"
],
"env": {
"ILOVEPDF_PUBLIC_KEY": "project_public_xxxxxxxx",
"ILOVEPDF_MCP_WORKDIR": "/path/to/workdir",
"ILOVEPDF_MCP_ALLOWED_DIRS": "/extra/root1:/extra/root2"
}
}
# Run it without installing (Node.js 18+)
ILOVEPDF_PUBLIC_KEY=project_public_xxxxxxxx npx -y @ilovepdf/mcp
# Or install it globally
npm install -g @ilovepdf/mcp
ilovepdf-mcp
Your files, under your control
The server runs on your machine and only touches the folders you allow.
Deny-by-default file access
Inputs and outputs must be inside your working folder or an allowed folder. Path traversal and escaping symlinks are blocked.
Only a public key
The server needs your project public key, never your secret key, and download links stay private by default.
Processed like any API task
Files go to iLoveAPI only to be processed, with the same security as the REST API.
Free server, the credits you already have
The MCP server is free and open source. Each tool call uses credits from your iLoveAPI project, like any API request.
- 2,500 free credits every month
- One credit balance for the API and the MCP server
- Prepaid packages and monthly plans
Put professional document tools in your AI workflow
- Open source, MIT
- 2,500 free credits every month
- Works with any MCP client
What is MCP?
The Model Context Protocol is an open standard that lets AI assistants and agents use external tools. The iLoveAPI MCP server exposes iLoveAPI document tools to any MCP client.
Which AI clients does it work with?
Gemini, Claude and AI agents: any MCP client that supports the stdio transport.
Which tools are available?
Compress, merge, split, Office to PDF, image to PDF, PDF to JPG, OCR, watermark and page numbers. Image tools, signature tools and more PDF tools are coming soon.
How much does it cost?
The server is free and open source (MIT). Each tool call uses credits from your iLoveAPI project, like an API request, and the free plan includes 2,500 credits every month.
Which key do I need?
Only your project public key (project_public_…), from API keys in your iLoveAPI console. Your secret key is never needed.
Where do my files go?
The server reads and writes files on your computer, inside the folders you allow. Files are sent to iLoveAPI only to be processed, with the same security as any API task.
Can I limit which folders it can access?
Yes. Set ILOVEPDF_MCP_WORKDIR to your working folder and add more folders with ILOVEPDF_MCP_ALLOWED_DIRS. Anything outside them is refused.
What happens with tools that return several files?
Split PDF and PDF to JPG save their results as a single .zip in your folder.
Is this the same as iLovePDF in ChatGPT, Claude or Gemini?
No. That is a hosted connector for iLovePDF Premium accounts, added from the third-party AI app (https://mcp.ilovepdf.com). The iLoveAPI MCP server runs on your machine with your iLoveAPI project key, for developers and AI agents.
Do I need to know how to code?
No. You add a short configuration to your AI client once, then ask in plain language.