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:
filesfile list,formattarget format
-
Watermark Removal (remove_watermark)
- Automatically identifies and removes watermarks from PDF documents
- Input:
filesPDF file list to process
-
Watermark Addition (add_watermark)
- Adds custom text watermarks to PDF documents
- Input:
filesfile list,textwatermark text,positionposition(center),opacitytransparency(1.0),rangepage range,layoutlayout(on),font_familyfont,font_sizefont size,font_colorfont color
-
Page Number Addition (add_page_numbers)
- Adds page numbers to PDF documents at specified positions
- Input:
filesfile list,start_numstarting page number(1),positionpage number position(5),marginmargin(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:
filesfile list,pagessplitting page rules,split_typesplitting type(page),merge_allwhether to merge(1)
-
PDF Merging (merge_pdfs)
- Merges multiple PDF files into one
- Input:
filesPDF files to merge
-
PDF Compression (compress_pdf)
- Optimizes PDF file size, adjustable image quality
- Input:
filesfile list,image_quantityimage quality(1-100, default 60)
-
PDF Encryption (protect_pdf)
- Adds password protection to PDF documents
- Input:
filesfile list,passwordnew password to set
-
PDF Decryption (unlock_pdf)
- Removes password protection from PDF documents
- Input:
filesfile list (with password)
-
PDF Rotation (rotate_pdf)
- Rotates pages in PDF documents
- Input:
filesfile list,rotatesrotation 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:
filesfile list
-
Image Extraction (extract_images)
- Extracts image resources from PDF files
- Input:
filesfile list,formatimage 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