mcp-server

v1.5.0
com.pdfgate/mcp-server Checked 20 hours ago Published 1 month ago

MCP server for the PDFGate API.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_pdf

Generate a PDF from a URL or raw HTML. Provide either 'url' or 'html', not both.

ParameterTypeDescription
cssstringCSS to inject before rendering
emulateMediaTypestring
enableFormFieldsbooleanEnable interactive PDF form fields from HTML
footerstringHTML string for the page footer
headerstringHTML string for the page header
htmlstringRaw HTML string to render as PDF
javascriptstringJavaScript to inject before rendering
marginBottomstringBottom margin
marginLeftstringLeft margin
marginRightstringRight margin
marginTopstringTop margin e.g. '10mm'
metadataobjectCustom metadata to attach
orientationstringPage orientation (default: portrait)
pageSizeTypestringPage size (default: a4)
preSignedUrlExpiresInintegerPre-signed download URL expiry in seconds (60–86400)
printBackgroundbooleanPrint background graphics (default: true)
urlstringPublic URL to render as PDF
waitForNetworkIdlebooleanWait for network idle before rendering

upload_file

Upload a PDF to PDFGate so it can be referenced by other operations. Provide either 'filePath' (local path) or 'url'.

ParameterTypeDescription
filePathstringAbsolute local path to the PDF file to upload
metadataobjectCustom metadata to attach
preSignedUrlExpiresInintegerPre-signed download URL expiry in seconds (60–86400)
urlstringPublicly accessible URL of the PDF to upload

get_document

Retrieve metadata for a stored PDFGate document by its ID.

ParameterTypeDescription
documentId *stringThe document ID
preSignedUrlExpiresInintegerGenerate a fresh pre-signed download URL expiring in this many seconds (60–86400)

delete_document

Delete a PDFGate document.

ParameterTypeDescription
documentId *stringThe document ID to delete

flatten_pdf

Flatten an interactive PDF into a static, non-editable PDF. Creates a new document; does not overwrite the original.

ParameterTypeDescription
documentId *stringThe source document ID to flatten
metadataobjectCustom metadata to attach
preSignedUrlExpiresInintegerPre-signed download URL expiry in seconds (60–86400)

extract_form_data

Extract form field values from a fillable PDF. Returns a JSON object mapping field names to their values.

ParameterTypeDescription
documentId *stringThe document ID of the fillable PDF

add_form_fields

Add interactive form fields to a stored PDF — from placeholder tags (refined via fieldOverrides) and/or explicitly positioned fields.

ParameterTypeDescription
documentId *stringThe document ID
fieldOverridesobjectPer-field overrides keyed by field name
fieldsarrayFields to add at explicit positions
preSignedUrlExpiresInintegerGenerate a fresh pre-signed download URL expiring in this many seconds (60–86400)

compress_pdf

Compress/optimise a PDF to reduce file size without changing visual content.

ParameterTypeDescription
documentId *stringThe source document ID to compress
linearizebooleanLinearise the PDF to enable fast web view (first page renders sooner)
metadataobjectCustom metadata to attach
preSignedUrlExpiresInintegerPre-signed download URL expiry in seconds (60–86400)

protect_pdf

Encrypt a PDF with a password and optional permission restrictions. Produces a new document; the original is unchanged.

ParameterTypeDescription
documentId *stringThe source document ID to protect
algorithmstringEncryption algorithm (default: AES256)
disableCopybooleanPrevent copying text
disableEditingbooleanPrevent editing
disablePrintbooleanPrevent printing
encryptMetadatabooleanEncrypt PDF metadata (default: false)
metadataobjectCustom metadata to attach
ownerPasswordstringFull-control owner password; required when using AES256 with a userPassword
preSignedUrlExpiresInintegerPre-signed download URL expiry in seconds (60–86400)
userPasswordstringPassword required to open the PDF

watermark_pdf

Apply a text or image watermark to a PDF. For type='text' provide 'text'; for type='image' provide 'watermarkImagePath'.

ParameterTypeDescription
documentId *stringThe source document ID
type *stringWatermark type
fontstringStandard PDF font name
fontColorstringFont colour as hex e.g. '#FF0000'
fontFilePathstringLocal path to a .ttf/.otf font file (overrides 'font')
fontSizenumberFont size in points
imageHeightnumberImage watermark height
imageWidthnumberImage watermark width
metadataobjectCustom metadata to attach
opacitynumberOpacity 0–1
preSignedUrlExpiresInintegerPre-signed download URL expiry in seconds (60–86400)
rotatenumberRotation in degrees (0–360)
textstringWatermark text (required when type='text')
watermarkImagePathstringLocal path to a .png/.jpg watermark image (required when type='image')
xPositionnumberHorizontal position
yPositionnumberVertical position

download_file

Download the raw PDF bytes of a stored document, returned as an embedded resource. For a shareable link instead, use get_document.

ParameterTypeDescription
documentId *stringThe document ID

create_envelope

Create a signing envelope from one or more existing PDFGate documents. Each recipient is given either as email and name or as the recipientId of a stored recipient. A recipient signs through the hosted flow (emailed link), embedded signing (embedded: sign inside your application via create_embed_link, no emails) or automatic signing (autoSign: the stored signature of a recipient enrolled with request_recipient_signature is applied on their behalf, no signing session). Use signingOrder to make recipients sign in sequence. Returns an envelope in 'created' status; call send_envelope to dispatch s…

ParameterTypeDescription
documents *arrayDocuments to include in the envelope
requesterName *stringName of the user or system creating the envelope
expiresInDaysintegerDays until the envelope and its signing links expire, counted from creation. Defaults to the account's envelope expiration setting.
metadataobjectCustom metadata to attach

send_envelope

Send a created envelope to its recipients. PDFGate dispatches signing emails with secure, OTP-protected links that stay valid until the envelope expires. Embedded recipients receive no email; create their signing links with create_embed_link after sending. On documents with a signingOrder only the first recipients are emailed; later recipients are activated as earlier ones sign.

ParameterTypeDescription
envelopeId *stringThe envelope ID to send

get_envelope

Retrieve the current state of an envelope including its status, document progress, and per-recipient signing status. Each recipient carries an embedded boolean; embedded recipients have no signing link — mint one with create_embed_link instead. Recipients on ordered documents carry signingOrder and, once it is their turn, activatedAt. Each recipient also carries autoSign (signed automatically with their stored signature) and sendSignedCopy (emailed the signed document on completion) booleans.

ParameterTypeDescription
envelopeId *stringThe envelope ID to retrieve

void_envelope

Void (cancel) an envelope in 'created' or 'in_progress' status. Recipients who have not signed are notified by email and their signing links stop working; documents already signed by all recipients are not affected. The optional reason is visible to recipients. Cannot be undone.

ParameterTypeDescription
envelopeId *stringThe envelope ID to void
reasonstringReason for voiding. Included in the cancellation email sent to recipients

delete_envelope

Permanently delete an envelope and the files it produced (signed documents and audit logs). Recipient data is anonymized and recipients lose access; source documents are not deleted. Only envelopes in 'draft', 'completed', 'expired', or 'voided' status can be deleted — void an active envelope first. Cannot be undone.

ParameterTypeDescription
envelopeId *stringThe envelope ID to delete

create_recipient

Store a recipient in your account so envelopes can reference them by recipientId. Emails are not unique; every call creates a new recipient, so use list_recipients first when reuse is intended.

ParameterTypeDescription
email *stringRecipient email address. Stored lowercased and cannot be changed later
metadataobjectCustom metadata to attach
namestringRecipient display name

list_recipients

List stored recipients with the given email (case-insensitive), oldest first.

ParameterTypeDescription
email *stringEmail to look up

get_recipient

Retrieve a stored recipient by ID. Once a stored signature was requested the response carries a signature object (status pending, active or revoked, plus requestedAt, adoptionMethod, enrolledAt, revokedAt, lastUsedAt and useCount); while the signature is active it also includes image, the signature as a PNG data URL, which can be very long.

ParameterTypeDescription
recipientId *stringThe recipient ID

update_recipient

Update a stored recipient's name or metadata. The email cannot be changed. Existing envelopes are not affected; they keep the recipient name they were created with.

ParameterTypeDescription
recipientId *stringThe recipient ID
metadataobjectReplacement custom metadata
namestringNew recipient display name

delete_recipient

Delete a stored recipient from your account directory. The record is kept with its personal data removed (email, name, phone, metadata and any stored signature), so later reads return 404 and a new envelope to the same address creates a fresh recipient; envelopes already sent keep their own copy and are not affected. Rejected with a 400 error while the recipient has an active stored signature or a pending enrolment — call remove_recipient_signature first.

ParameterTypeDescription
recipientId *stringThe recipient ID

request_recipient_signature

Automatic signing: email a stored recipient a link to store a reusable signature (they verify their email with a one-time code, accept the authorization text and type, draw or upload their signature). The link is valid for 7 days and calling this again replaces a pending request with a new link. Returns the recipient with signature.status 'pending'; once they complete the enrolment the recipient.signature.enrolled webhook fires and envelopes can set autoSign on this recipient. Rejected with a 400 error when the recipient has no email or already has an active stored signature (remove it first w…

ParameterTypeDescription
recipientId *stringThe recipient ID

remove_recipient_signature

Automatic signing: remove the stored signature of a recipient (signature.status becomes 'revoked' and the recipient.signature.revoked webhook fires) or cancel a pending enrolment so its link stops working. Envelopes already waiting on the automatic signature fall back to a signing link emailed to the recipient. Idempotent: a recipient without a stored signature is returned unchanged. Required before delete_recipient while a signature is active or an enrolment is pending.

ParameterTypeDescription
recipientId *stringThe recipient ID

create_webhook

Create a PDFGate webhook subscription. The response includes a signing secret — store it securely to verify incoming event signatures.

ParameterTypeDescription
eventTypes *arrayEvent types to subscribe to
url *stringThe HTTPS endpoint that will receive webhook events
descriptionstringOptional label to identify this webhook

get_webhook

Retrieve a PDFGate webhook subscription by its ID.

ParameterTypeDescription
webhookId *stringThe webhook ID

delete_webhook

Delete a PDFGate webhook subscription. Future events will no longer be delivered to the associated endpoint.

ParameterTypeDescription
webhookId *stringThe webhook ID to delete