PaperType

v0.1.0
dev.papertype/papertype-mcp Checked 1 day ago Published 1 month ago

Render Markdown, HTML or invoice/certificate/report templates to PDF files via the PaperType API.

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

render_pdf Render a PDF with PaperType

Render a PDF from Markdown, HTML, or a hosted template (invoice, certificate, report) using the PaperType API, and save it to disk. Returns the absolute file path, page count and remaining quota; the PDF bytes are never returned inline. Provide exactly one source: `markdown`, `html`, or `template` + `data`. Each call uses one document of the account's monthly quota.

ParameterTypeDescription
authorstringAuthor shown on the cover page and in PDF metadata.
coverbooleanAdd a cover page with title, author and date (markdown/html). Default false.
cssstringExtra CSS appended after the theme (markdown/html). May include @page rules, e.g. '@page { margin: 2cm }'.
dataobjectJSON object of fields for the chosen template (required when template is set). Shape per template is shown by list_templates.
datestringDate text shown on the cover page, e.g. '2026-10-18' or 'October 2026'.
filenamestringSuggested file name (e.g. 'invoice-014.pdf'). Used for the saved file's name when output_path is not given.
footerstringFooter text printed bottom-left on every page (e.g. a confidentiality note).
headerstringRunning header text printed top-right on every page.
htmlstringHTML document or fragment to render. A theme wraps it in page styles unless theme is 'none'. Provide exactly one of markdown, html, or template+data.
markdownstringMarkdown source for the document (GitHub-flavoured: headings, lists, tables, fenced code, footnotes, admonitions). Provide exactly one of markdown, html, or template+data.
output_pathstringWhere to save the PDF. Omit to get a unique file named after the title under the server's output directory (PAPERTYPE_OUTPUT_DIR, default <tmp>/papertype). An existing directory (or a path ending in '…
page_numbersbooleanPrint page numbers in the footer. Default true.
page_sizestringPaper size. Default A4. Use 'Letter' for US documents.
templatestringName of a hosted template to fill with `data` instead of writing markdown/html: 'invoice', 'certificate' or 'report'. Call list_templates to see each template's fields and sample data.
themestringPage style for markdown/html input. 'clean' (default, general documents), 'report' (formal, good with cover+toc), 'minimal' (plain), 'letter' (correspondence), 'none' (HTML only: no theme, just your o…
titlestringDocument title: used for the PDF metadata, the cover page, and the default output filename.
tocbooleanAdd a table of contents built from headings. Markdown input only. Default false.

list_templates List PaperType templates

List the hosted PDF templates available to render_pdf (invoice, certificate, report) with a description, the fields each accepts (name, type, required) and a complete sample `data` object you can adapt. No network call; uses no quota.

account PaperType account status

Show the PaperType account behind the configured API key: email, plan, monthly document quota, documents used this month, and whether output carries the free-plan mark. Uses no quota.