mcp-server

v1.9.7
io.github.TemplateFoxPDF/mcp-server Checked 1 day ago Published 7 months ago

MCP server for TemplateFox PDF generation API - Generate PDFs from templates via AI assistants

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 template with dynamic data. Returns a URL to download the generated PDF. Costs 1 credit per generation. Use list_templates to find available templates and get_template_fields to discover required data fields.

ParameterTypeDescription
data *objectKey-value data to render in the template. Keys must match template variables.
template_id *stringTemplate short ID (12 characters)
expirationintegerURL expiration in seconds. Min: 60 (1 min), Max: 604800 (7 days). Only applies to `url` export type.
export_typestringExport format: `url` uploads to CDN and returns URL, `binary` returns raw PDF bytes
filenamestringCustom filename for the PDF (without .pdf extension). If not provided, defaults to 'document'. Only applies to `url` export type.
pdf_variantstringGenerate a standards-compliant PDF variant. Use `pdf/a-3b` for archival compliance (most common). Use `pdf/a-3b` if you need file attachments (e.g. Factur-X). When not set, a standard PDF is generated…
s3_bucketstringOverride the default bucket configured in your S3 integration.
s3_filepathstringCustom path prefix in your S3 bucket. Uses default prefix if not provided.
store_s3booleanUpload to your configured S3 bucket instead of CDN

generate_pdf_async

Queue an asynchronous PDF generation job. Returns a job_id for status polling. Use for large documents or when you need webhook notifications. Costs 1 credit. Check progress with get_pdf_job_status.

ParameterTypeDescription
data *objectKey-value data to render in the template.
template_id *stringTemplate short ID (12 characters)
expirationintegerURL expiration in seconds (60-604800). Default: 86400 (24 hours).
export_typestringExport format. Currently only `url` is supported for async.
filenamestringCustom filename for the PDF (without .pdf extension).
pdf_variantstringGenerate a standards-compliant PDF variant. Use `pdf/a-3b` for archival compliance (most common). Use `pdf/a-3b` if you need file attachments (e.g. Factur-X). When not set, a standard PDF is generated…
s3_bucketstringOverride the default bucket configured in your S3 integration.
s3_filepathstringCustom path prefix in your S3 bucket.
store_s3booleanUpload to your configured S3 bucket instead of CDN.
webhook_secretstringSecret for HMAC-SHA256 signing of webhook payloads (min 16 chars).
webhook_urlstringURL to receive POST notification when job completes or fails. Must be a public HTTPS URL.

get_pdf_job_status

Get the status of an async PDF generation job. Returns status (pending, processing, completed, failed) and the PDF URL when completed.

ParameterTypeDescription
job_id *stringAsync job ID (UUID returned by the create-async endpoint)

list_pdf_jobs

List async PDF generation jobs. Supports pagination and filtering by status.

ParameterTypeDescription
limitintegerMaximum number of results to return
offsetintegerNumber of results to skip (for pagination)
statusstringFilter jobs by status

list_templates

List all available PDF templates. Returns template IDs and names. Use this to discover which templates are available before generating a PDF.

get_template_fields

Get the dynamic fields for a specific template. Use this to know what data to provide when generating a PDF. Returns field names, types, and whether they are required.

ParameterTypeDescription
template_id *stringTemplate short ID (12 characters)

get_account_info

Get account information including remaining credits and email address.

list_transactions

List credit transaction history showing PDF generations, purchases, and refunds. Supports pagination.

ParameterTypeDescription
limitintegerNumber of records to return
offsetintegerNumber of records to skip