compress_pdf
Compress/optimise a PDF to reduce file size without changing visual content.
Generate a PDF from HTML or a URL, process it, and send it out for signature — in one connection.
LABSCO SUMMARY
Flattening and encrypting both leave the original in place, which matters when a step goes wrong halfway through a pipeline. The signing side is part of the same connection, so a rendered invoice can go out for signature without leaving the conversation.
PDFGate's own server, covering three stages of a document's life: rendering it, working on it, and getting it signed. Documents are stored on PDFGate and referenced by ID, so each operation takes the last one's output without files moving through the conversation.
A PDFGate account and a key whose prefix picks the environment: live_ for production, test_ for the sandbox. Two ways in — over stdio from npm as @pdfgate/mcp-server with PDFGATE_API_KEY set, or the hosted server at https://mcp.pdfgate.com/server, which takes either OAuth in the browser with no key to store, or the key in an X-API-KEY header. Receiving webhook events locally means exposing port 3599 to the internet and registering that public URL.
One command plus a key — npx -y @pdfgate/mcp-server, then supply credentials
USE CASES
Render the URL or the HTML with your margins, headers and page size, then fetch the stored document by ID when you need it again.
Compress it to a sendable size, stamp it with a watermark, and lock it with a password and the permissions you want.
Pull the form values out as a name-to-value object, then flatten the file so the answers can no longer be edited.
Build the envelope from the stored documents, send it so the recipients get OTP-protected links, and follow the per-recipient status.
Subscribe an endpoint to the events you care about, keep the signing secret to verify what arrives, and unsubscribe when it retires.
Upload it from disk or a URL, run whatever transform it needs, and remove it when the job is done.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
compress_pdfCompress/optimise a PDF to reduce file size without changing visual content.
create_envelopeCreate a signing envelope from one or more existing PDFGate documents. Returns an envelope in 'created' status; call send_envelope to dispatch signing emails.
create_webhookCreate a PDFGate webhook subscription. The response includes a signing secret — store it securely to verify incoming event signatures.
delete_documentDelete a PDFGate document.
delete_webhookDelete a PDFGate webhook subscription. Future events will no longer be delivered to the associated endpoint.
extract_pdf_form_dataExtract form field values from a fillable PDF. Returns a JSON object mapping field names to their values.
flatten_pdfFlatten an interactive PDF into a static, non-editable PDF. Creates a new document; does not overwrite the original.
generate_pdfGenerate a PDF from a URL or raw HTML. Provide either 'url' or 'html', not both.
get_documentRetrieve metadata for a stored PDFGate document by its ID.
get_envelopeRetrieve the current state of an envelope including its status, document progress, and per-recipient signing status.
protect_pdfEncrypt a PDF with a password and optional permission restrictions. Produces a new document; the original is unchanged.
send_envelopeSend a created envelope to its recipients. PDFGate dispatches signing emails with secure, OTP-protected links that expire after 30 days.
upload_pdfUpload a PDF to PDFGate so it can be referenced by other operations. Provide either 'filePath' (local path) or 'url'.
watermark_pdfApply a text or image watermark to a PDF. For type='text' provide 'text'; for type='image' provide 'watermarkImagePath'.
BEFORE YOU INSTALL
14 tools when we connected. download_file, add_form_fields and get_webhook are documented but missing from the npm package; the hosted server at mcp.pdfgate.com offers the full toolset. upload_file is upload_pdf, and extract_form_data is extract_pdf_form_data.
Of the 3 documented setups, 1 runs the server on your machine and 2 connect to a hosted endpoint.
CONTEXT COST
Rated by the size of the 14 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @pdfgate/mcp-server{
"mcpServers": {
"pdfgate": {
"command": "npx",
"args": [
"-y",
"@pdfgate/mcp-server"
],
"env": {
"PDFGATE_API_KEY": "<YOUR_PDFGATE_API_KEY>"
}
}
}
}{
"mcpServers": {
"pdfgate": {
"type": "http",
"url": "https://mcp.pdfgate.com/server",
"headers": {
"X-API-KEY": "<YOUR_API_KEY>"
}
}
}
}https://mcp.pdfgate.com/server