PDFShift

v1.0.0
io.github.cnicodeme/pdfshift Checked 1 day ago Published 28 days ago

A remote MCP server to convert HTML documents (URL or raw source) to PDF or screenshots

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

convert

Convert an HTML document or a URL to a PDF, PNG, JPEG or WEBP file. Returns a temporary download URL (valid ~2 days).

ParameterTypeDescription
source *stringA URL (http/https) or a raw HTML string to convert.
cssstringExtra CSS to inject, as a URL or raw string.
delayintegerMilliseconds to wait before capture (max 10000).
formatstringOutput format: pdf (default), png, jpeg or webp.
landscapebooleanLandscape orientation instead of portrait (PDF only).
sandboxbooleanGenerate a free, watermarked document that does not consume credits. Useful for testing.
use_printbooleanUse the print CSS media type instead of screen.
wait_forstringA JS variable/function or CSS selector to wait for before capturing.

list_templates

List all saved HTML templates for the account.

get_template

Get the raw HTML content of a template by its slug.

ParameterTypeDescription
slug *stringThe template slug.

create_template

Create a new reusable HTML template.

ParameterTypeDescription
content *stringHTML content of the template.
name *stringHuman-readable name.
slug *stringUnique identifier for the template.

update_template

Update the name and/or HTML content of an existing template.

ParameterTypeDescription
content *stringNew HTML content.
slug *stringThe template slug to update.
namestringNew name.

delete_template

Delete a template by its slug.

ParameterTypeDescription
slug *stringThe template slug to delete.

generate_from_template

Render a saved template to HTML, PDF, PNG, JPEG or WEBP. Document formats return a temporary download URL; html returns the rendered markup. Pass template variables and any conversion option as extra properties.

ParameterTypeDescription
slug *stringThe template slug to render.
formatstringOutput: html, pdf (default), png, jpeg or webp.

credits_usage

Get the current credit usage for the account (remaining, total, used).

pricing

List the available PDFShift plans and their pricing (credits, price, overage, monthly/yearly). Custom plans specific to the account are included when authenticated.

list_logs

List recent conversion logs for the account.

ParameterTypeDescription
cursorstringPagination cursor from a previous response.
keystringFilter to a specific API key (public id). Default: all keys.
limitintegerNumber of items to return (5-100, default 20).
statusstringFilter by status.

get_log

Get a single conversion log by its request id.

ParameterTypeDescription
request_id *stringThe request id of the conversion.