LightPDF Agent MCP Server
LightPDF Agent MCP Server is a document format conversion tool based on MCP (Model Context Protocol), supporting various document format conversions and PDF processing functions. This tool needs to be configured in software that supports MCP functionality (such as Cursor, Claude, etc.).
Tool List
-
Format Conversion (convert_document)
- Supports conversion between various document formats
- PDF can be converted to: DOCX/XLSX/PPTX/Images(Long Image)/HTML/TXT
- Other formats can be converted to PDF: DOCX/XLSX/PPTX/Images/CAD/CAJ/OFD
- Input:
files
file list,format
target format
-
Watermark Removal (remove_watermark)
- Automatically identifies and removes watermarks from PDF documents
- Input:
files
PDF file list to process
-
Watermark Addition (add_watermark)
- Adds custom text watermarks to PDF documents
- Input:
files
file list,text
watermark text,position
position(center),opacity
transparency(1.0),range
page range,layout
layout(on),font_family
font,font_size
font size,font_color
font color
-
Page Number Addition (add_page_numbers)
- Adds page numbers to PDF documents at specified positions
- Input:
files
file list,start_num
starting page number(1),position
page number position(5),margin
margin(30) - Position Guide: 1-Top Left, 2-Top Center, 3-Top Right, 4-Bottom Left, 5-Bottom Center, 6-Bottom Right
- Margin Guide: 10/30/60
-
PDF Splitting (split_pdf)
- Splits PDF documents by page range
- Input:
files
file list,pages
splitting page rules,split_type
splitting type(page),merge_all
whether to merge(1)
-
PDF Merging (merge_pdfs)
- Merges multiple PDF files into one
- Input:
files
PDF files to merge
-
PDF Compression (compress_pdf)
- Optimizes PDF file size, adjustable image quality
- Input:
files
file list,image_quantity
image quality(1-100, default 60)
-
PDF Encryption (protect_pdf)
- Adds password protection to PDF documents
- Input:
files
file list,password
new password to set
-
PDF Decryption (unlock_pdf)
- Removes password protection from PDF documents
- Input:
files
file list (with password)
-
PDF Rotation (rotate_pdf)
- Rotates pages in PDF documents
- Input:
files
file list,rotates
rotation parameters list - Rotation parameter format:
[{"angle": 90, "pages": "1-3"}, {"angle": 180, "pages": "4-6"}]
- Angle Guide: 90/180/270
-
Margin Removal (remove_margin)
- Removes white margins from PDF documents (crops page margins)
- Input:
files
file list
-
Image Extraction (extract_images)
- Extracts image resources from PDF files
- Input:
files
file list,format
image format(bmp/png/gif/tif/jpg, default png)
Output: URL containing downloadable files
Configuration Guide
To use LightPDF Agent MCP Server, you need to obtain an API key and configure it on your operating system. Before configuration, please get your API key from the LightPDF Developer Platform.
Environment Dependencies
LightPDF Agent MCP Server requires the following environment dependencies:
- Python 3.8 or higher
- uv package manager
Installation Steps
-
Install uv package manager:
# On macOS and Linux. curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows. powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Ensure Python 3.8 or higher is installed. If not, install it using:
uv python install 3.12
-
Install MCP Server using uv:
uv tool install lightpdf-aipdf-mcp@latest
MCP Configuration File
After Cursor installation, the MCP configuration file will be automatically created. You just need to edit this file and add the following content:
{
"mcpServers": {
"lightpdf": {
"command": "uvx",
"args": [
"lightpdf-aipdf-mcp@latest"
],
"env": {
"API_KEY": "your_api_key_here",
"API_ENDPOINT": "techsz.aoscdn.com/api"
}
}
}
}
Configuration file path:
- macOS/Linux:
~/.cursor/mcp.json
- Windows:
C:\\Users\\username\\.cursor\\mcp.json
* Replace API_KEY with your key obtained from the LightPDF Developer Platform
After configuration, restart the client to make it effective. You can use LightPDF Agent's features to process documents through AI conversation without writing any code.
Features and Advantages
- Supports conversion between various document formats
- Supports local files and network URLs
- Supports batch conversion
- Provides complete PDF file processing functions
- Concurrent processing for improved conversion efficiency
- Compliant with MCP protocol for easy integration
- Supports password-protected PDF file processing
- Supports custom watermarks and page numbers
- Supports image extraction and page rotation
- Supports margin removal for optimized page layout
- Supports long image conversion
- Supports CAD/CAJ/OFD format conversion