# PDF Generator API

MCP server for the PDF Generator API — generate PDFs from templates, manage templates and workspaces, watermark, encrypt, optimize, convert HTML/URL to PDF, fill PDF forms, create e-invoices, generat…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add pdf-generator-api/mcp-server

# Browse available tools
npx -y @smithery/cli@latest tool list pdf-generator-api/mcp-server

# Get full schema for a tool
npx -y @smithery/cli@latest tool get pdf-generator-api/mcp-server get_status

# Call a tool
npx -y @smithery/cli@latest tool call pdf-generator-api/mcp-server get_status '{}'
```

## Direct MCP Connection

Endpoint: `https://mcp-server--pdf-generator-api.run.tools`

## Tools (49)

- `get_status` — Returns service status / health
- `add_watermark` — Adds a text or an image watermark to PDF document from base64 string or a remote URL.
- `encrypt_document` — Encrypts a PDF document from base64 string or a remote URL.
- `decrypt_document` — Decrypts an encrypted PDF document from base64 string or a remote URL.
- `optimize_document` — Optimizes the size of a PDF document from base64 string or a remote URL.
- `make_accessible` — Adds accessibility tags to a PDF document from base64 string or a remote URL.
- `extract_form_fields` — Extracts form fields and their metadata from a PDF document using base64 string or a remote URL.
- `fill_form_fields` — Fills form fields in a PDF document with provided data from base64 string or a remote URL.
- `get_templates` — Returns a list of templates available for the authenticated workspace
- `create_template` — Creates a new template. If template configuration is not specified in the request body then an empty template is create…
- `get_template_schema` — Returns Template JSON Schema which defines the structure of the Template Definition.
- `import_template` — Creates a template from existing PDF
- `validate_template` — Validates if the provided template configuration matches the template JSON schema.
- `get_template` — Returns template configuration
- `update_template` — Updates template configuration. The template configuration for pages and layout must be complete as the entire configur…
- `delete_template` — Deletes the template from workspace
- `get_template_data` — Returns all data fields used in the template. Returns structured JSON data that can be used to check which data fields …
- `copy_template` — Creates a copy of a template to the workspace specified in authentication parameters.
- `open_editor` — Returns an unique URL which you can use to redirect your user to the editor from your application or use the generated …
- `list_template_versions` — Returns a paginated list of template versions for the specified template.
- `get_template_version` — Returns the template definition of the specified version.
- `delete_template_version` — Deletes the specified template version.
- `promote_template_version` — Promotes the specified template version to production.
- `get_documents` — Returns a list of generated documents created by authorized workspace and stored in PDF Generator API. If master user i…
- `get_document` — Returns document stored in the Document Storage
- `delete_document` — Delete document from the Document Storage
- `generate_document` — Merges template with data and returns base64 encoded document or a public URL to a document. NB! When the public URL op…
- `generate_document_async` — Merges template with data as asynchronous job and makes POST request to callback URL defined in the request. Request us…
- `generate_document_batch` — Allows to merge multiple templates with data and returns base64 encoded document or public URL to a document. NB! When …
- `generate_document_batch_async` — Merges template with data as asynchronous job and makes POST request to callback URL defined in the request. Request us…
- `get_async_job_status` — Returns status of an async job
- `get_workspaces` — Returns all workspaces in the organization
- `create_workspace` — Creates a regular workspace with identifier specified in the request.
- `get_workspace` — Returns workspace information for the workspace identifier specified in the request.
- `delete_workspace` — Delete workspace. Only regular workspaces can be deleted.
- `convert_html_to_pdf` — Converts HTML content to PDF
- `convert_url_to_pdf` — Converts public URL to PDF
- `get_forms` — Returns a list of forms available for the organization
- `create_form` — Creates a new form based on the configuration sent in the request body.
- `import_form` — Creates a new form based on editable PDF
- `get_form` — Returns form configuration
- `update_form` — Updates the form configuration. The form configuration must be complete as the entire configuration is replaced and not…
- `delete_form` — Deletes the form with specified id
- `share_form` — Creates an unique sharing URL to collect form data
- `generate_qr_code` — Creates a QR code based on the configuration
- `create_einvoice` — This endpoint transforms a JSON payload into an XML-based e-invoice that is fully compliant with the European EN 16931 …
- `create_xrechnung_einvoice` — This endpoint transforms a JSON payload into an XML-based XRechnung e-invoice that is fully compliant with the European…
- `create_facturx_einvoice` — This endpoint transforms a JSON payload a Factur-X e-invoice that is fully compliant with the European EN 16931 standar…
- `get_einvoice_schema` — Returns e-invoice JSON schema which defines the structure of the e-invoice.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get pdf-generator-api/mcp-server <tool-name>
```

## Prompts (3)

- `generate-pdf` (templateId, outputFormat) — Generate a PDF document by selecting a template and providing data to fill it with
- `convert-to-pdf` (source, paperSize) — Convert HTML content or a public URL to a PDF document
- `create-einvoice` (format) — Create an e-invoice compliant with EN 16931 standard in UBL, CII, XRechnung, or Factur-X format
