foxit-pdf-api-mcp-server
The Foxit PDF API is a powerful tool for automating the generation, editing, and conversion of PDF documents. Easily used with Python, it streamlines the manipulation of PDF files through its API. It is particularly effective in automating business processes and document management.
GitHub Stars
7
User Rating
Not Rated
Favorites
0
Views
32
Forks
0
Issues
2
Foxit Cloud API MCP Server
A Model Context Protocol (MCP) server that integrates Foxit Cloud API PDF manipulation tools directly into your development workflow through GitHub Copilot in Visual Studio Code.
🚀 Features
The Foxit Cloud API MCP Server provides the following tools for PDF manipulation:
- convert_pdf_to_file: Convert a PDF file to formats like text, images, Word, Excel, HTML, or PowerPoint.
- convert_file_to_pdf: Convert files (e.g., docx, pptx, xlsx, txt, images) to PDF format.
- convert_url_to_pdf: Convert a web page from a URL to a PDF file.
- combine_pdfs: Merge multiple PDF files into a single PDF document.
- compare_pdfs: Compare two PDF files and generate a report or visual difference document.
- compress_pdf: Compress a PDF file to reduce its size with adjustable compression levels.
- extract_pdf: Extract text, images from a PDF file.
- flatten_pdf: Remove interactive elements (e.g., forms, annotations) to create a static PDF.
- linearize_pdf: Optimize a PDF file for fast web viewing with progressive loading.
- remove_pdf_password: Remove password protection from a PDF file using the owner password.
- protect_pdf: Add password encryption to a PDF file with user and owner passwords.
- split_pdf: Split a PDF file into multiple files based on the number of pages per file.
- manipulate_pdf: Perform page manipulations like moving, deleting, adding, or rotating pages.
📋 Prerequisites
Before getting started, ensure you have:
- Python 3.10 or higher installed and added to your PATH
- Visual Studio Code with the GitHub Copilot extension which supports Agent Mode and Model Context Protocol (MCP) capabilities.
- pip package manager (latest version recommended)
- Foxit Cloud API credentials (Client ID and Client Secret)
🔧 Installation
Step 1: Get Your API Credentials
- Visit the Foxit Cloud API portal
- Sign up for a free account
- Obtain your Client ID and Client Secret
- The offical host URL for the API is
https://na1.fusion.foxit.com/pdf-services/api
Step 2: Build and Install the Package
Clone this repository and navigate to the project directory:
git clone <repository-url> cd foxit-pdf-api-mcp-server/stdio-pythonEnsure you have
setuptoolsinstalled:pip install setuptools wheeland then build the package by following commands:
python setup.py sdist bdist_wheelInstall the package:
pip install ./dist/foxit_pdf_cloudapi-1.0.0-py3-none-any.whlNote: Replace the version number with the actual version generated during build.
Step 3: Configure VS Code
Open VS Code and access the Command Palette:
- Windows/Linux:
Ctrl+Shift+P - macOS:
Cmd+Shift+P
- Windows/Linux:
Type
MCPand select "MCP: Add Server..."Choose "Command (stdio)" as the server type
Enter the following command and arguments:
foxit-cloudapi-mcp-service --host https://na1.fusion.foxit.com/pdf-services/api --client_id ${input:client-id} --client_secret ${input:client-secret}Choose your configuration scope:
- User Setting: Global configuration for all VS Code projects
- Workspace Setting: Project-specific configuration
Note:Please visit VS Code settings document for more details on MCP server configuration.
When prompted, enter your Foxit Cloud API credentials.The configuration will be saved as:
{
"version": "1.0",
"name": "Foxit Cloud API MCP Server",
"description": "MCP Server for Foxit Cloud API PDF manipulation tools",
"type": "stdio",
"command": "foxit-cloudapi-mcp-service",
"args": [
"--host",
"https://na1.fusion.foxit.com/pdf-services/api",
"--client_id",
"${input:client-id}",
"--client_secret",
"${input:client-id}"
]
}
Note: Two placeholders (${input:client-id} and ${input:client-id}) need to be manually replaced with your actual credentials.
🎯 Usage
Starting the Server
Using VS Code Interface:
- Open
mcp.jsonorsettings.jsonfile where you configured the MCP server - Click the Start button that appears above the server configuration
- Enter your credentials when prompted (stored securely for future use)
- Open
Verify Server Status:
- Open GitHub Copilot Chat (
Ctrl+Alt+I/Cmd+Ctrl+I) - Switch to Agent mode in the chat view
- Click the Tools button to view available MCP servers
- Confirm "Foxit Cloud API MCP Server" is listed and running
- Open GitHub Copilot Chat (
Making Your First Request
Once the server is running, you can interact with PDF tools through natural language in GitHub Copilot Chat:
@copilot /agent Convert this PDF to Word format
@copilot /agent combine foo.pdf and goo.pdf and name it something.pdf
@copilot /agent Compress the uploaded PDF
@copilot /agent Merge these PDF files
🔍 Troubleshooting
Common Issues
- Server fails to start: Check the "MCP Server Logs" in VS Code's Output panel
- Authentication errors: Verify your Client ID and Client Secret are correct
- Port conflicts: Ensure no other services are using the required ports
- Missing dependencies: Reinstall the package and check Python version
📄 License
This project is licensed under the MIT License.
⚠️ Security Notice
Only install MCP servers from trusted sources. Always review configurations before running to prevent unauthorized code execution.
Made with ❤️ by the Foxit development team
0
Followers
0
Repositories
0
Gists
0
Total Contributions
🤩 Easy-to-use global IM bot platform designed for the LLM era / 简单易用的大模型即时通信机器人开发平台 ⚡️ Bots for QQ / QQ频道 / Discord / WeChat(微信)/ Telegram / 飞书 / 钉钉 / Slack 🧩 Integrated with ChatGPT(GPT)、DeepSeek、Dify、n8n、Claude、Google Gemini、xAI、PPIO、Ollama、阿里云百炼、SiliconFlow、Qwen、Moonshot(Kimi K2)、SillyTraven、MCP、WeClone etc. LLM & Agent & RAG