Foxit MCP Server Brings 30+ PDF Tools to AI Agents
How developers can connect AI agents to PDF conversion, OCR, document structure analysis, and signing workflows using Foxit's MCP Server and related APIs.
Curator Note: PDF work can take hours when documents are long or scanned. Foxit's MCP Server connects AI agents to more than 30 PDF tools:
Introduction
PDFs are easy to share, but finding information inside them can take time. A scanned page may not allow text search, and a long report can hide one small detail across hundreds of pages. Foxit's MCP Server gives AI agents access to tools that can handle these tasks through a single connection.
Why PDF Tasks Take So Much Development Time
A single PDF task can involve several operations. A Word file may need conversion, selected pages may need extraction, and the final document may need compression before sharing. Each operation can require a separate API request.
Developers also have to manage file uploads, authentication, processing time, downloads, and errors. When these tasks happen across many documents, the code becomes harder to maintain. Much of the work goes into connecting services and managing the same steps again and again.
Foxit's PDF API MCP Server connects AI agents to more than 30 PDF tools through the Model Context Protocol (MCP). The server handles communication with Foxit's cloud PDF Services API and manages the processing steps behind each tool call. Developers can make these tools available to an AI agent without writing separate REST API code for every PDF operation.
How the Foxit MCP Connection Works
MCP provides a standard way for AI applications to communicate with external tools. The connection has three main parts: the Host, the Server, and the Tools. Each part has a separate role.
The Host is the AI application, such as Claude Desktop, Cursor, or VS Code. The Server provides access to external services, while the Tools perform individual operations. Each tool has a JSON schema that tells the host which inputs it needs and what kind of result it can return.
Once the Foxit MCP Server is registered, the host can discover its available PDF tools. A developer can ask an AI agent to convert a Word document into a PDF and then reduce its file size. The agent can select pdf_from_word followed by pdf_compress, while the server handles the underlying PDF processing.
What Can the 30+ PDF Tools Do?
Foxit's tools cover document creation, conversion, editing, analysis, security, and file management. They can handle different file types and several common PDF operations. The main tools fall into these groups:
- Document management: upload_document, download_document, and delete_document handle files used during processing.
- PDF creation: pdf_from_word, pdf_from_excel, pdf_from_ppt, pdf_from_image, pdf_from_text, pdf_from_html, and pdf_from_url create PDFs from different sources.
- PDF conversion: pdf_to_word, pdf_to_excel, pdf_to_ppt, pdf_to_text, pdf_to_html, and pdf_to_image export PDF content into other formats.
- Page operations: pdf_merge, pdf_split, pdf_extract, and pdf_manipulate combine, divide, extract, rotate, delete, and reorder pages.
- File processing: pdf_compress, pdf_flatten, pdf_linearize, and pdf_watermark handle file size, form flattening, web viewing, and watermarks.
- Analysis: pdf_compare, pdf_ocr, and pdf_structural_analysis examine document content and structure.
- Security and forms: pdf_protect, pdf_remove_password, export_pdf_form_data, and import_pdf_form_data handle document protection and form information.
The pdf_compress tool can reduce file size by 30–70%, depending on the content. The pdf_linearize tool prepares a PDF for Fast Web View, allowing browsers to load pages incrementally. Developers can also use get_pdf_properties to inspect page count, dimensions, encryption status, digital signature information, fonts, and metadata.
Two Tools Worth Exploring
pdf_ocr and Scanned Documents
A scanned PDF often contains images of pages rather than searchable text. Finding a name, date, or sentence inside such a file can mean checking pages one by one. This becomes a problem when working with large collections of scanned reports or records.
Foxit's pdf_ocr tool uses optical character recognition to recognise text inside scanned and image-based PDFs. It converts that text into searchable content and supports multiple languages. This can help when working with old records, scanned documents, and files that do not contain selectable text.
pdf_structural_analysis and Document Layout
A PDF contains more than written content. Its headings, paragraphs, tables, images, links, and form fields all have their own positions within the document. These details can help an AI agent understand where information appears.
The pdf_structural_analysis tool examines these elements and returns structural information in JSON format, packaged inside a downloadable ZIP file. It can identify titles, headings, paragraphs, tables with cell grids, images, hyperlinks, form fields, and metadata. The results also include bounding boxes, which describe the positions of elements on the page.
There is an important difference between finding structure and understanding meaning. This tool identifies where document elements appear, but it does not directly return business details such as company names or contract values. The AI model reads the structural data and identifies the information needed for the task.
Where eSign and DocGen Fit In
Foxit also provides eSign and DocGen APIs for document signing and generation. DocGen can fill templates with supplied information and produce finished documents. The eSign API can create signing folders, send documents to signers, and retrieve signing activity records.
Neither API is part of the Foxit MCP Server's 30+ PDF tools. Both are separate REST services, so an AI agent needs its own code-execution layer or custom tools to call them. The eSign API also uses a separate OAuth2 authentication flow, keeping its credentials separate from PDF Services authentication.
A contract workflow can use these services along with the PDF tools. The agent can upload a Word contract, convert it into a PDF, examine its structure, and identify the required information. DocGen can then prepare the final contract, while eSign can send it to the required people for signing.
Getting Started and Production Considerations
The setup requires a Foxit developer account, API credentials, and an MCP-compatible host. Developers can use Python 3.11 or later with the uv package manager, or the TypeScript version with Node.js 18 or later and pnpm. The official guide covers registration with Claude Desktop and VS Code, including the required configuration.
A few technical details need attention before using the server:
- Authentication: Store client_id and client_secret in environment variables before launching the MCP host.
- Document processing: Most tools use a documentId returned by upload_document and provide a resultDocumentId for the processed file.
- Task handling: The MCP Server handles asynchronous polling internally and returns the result after processing finishes.
- Large documents: Filter structural JSON before sending it to an AI model, as a long document can contain thousands of elements.
- Security: Foxit states that API traffic uses TLS 1.2+ and documents at rest use AES-256 encryption.
- Production use: Check data residency requirements and the applicable volume plan before moving beyond development and testing.
The server also supports a per-call approval flow in Claude Desktop, where the user can inspect the selected tool and its arguments before execution. For production workflows, the guide recommends wrapping eSign and DocGen operations as custom MCP tools with typed inputs. This keeps credentials in the tool process and makes agent actions easier to inspect.
Final Thoughts
The Foxit MCP Server gives AI agents access to a wide range of PDF operations through one connection. Developers can use these tools for conversion, OCR, page management, document comparison, and structural analysis. Separate eSign and DocGen APIs can extend the same workflow into document creation and signing.
The pdf_ocr and pdf_structural_analysis tools are particularly interesting for anyone who works with scanned files and lengthy reports. Testing them on real documents would help show how they handle different layouts and types of content. Finding information inside a document should not take longer than working with the information itself.
原文:https://www.a8q9.cn/en/article/foxit-mcp-server-brings-30-pdf-tools-to-ai-agents-211c03.html