dev.filetopdf/filetopdf-mcp
Official4 toolsby FileToPDF · TypeScript
FileToPDF
Convert files, HTML, and Markdown to PDF via the FileToPDF API. Bring your own API key.
Convert files, HTML, and Markdown documents to PDF format.
Captured live from the server via tools/list.
get_account
Check the FileToPDF API key and return the plan, remaining conversion credits, and subscription status. Free — costs no credits. Use this to verify the connection works.
No parameters.
convert_file
Convert a file fetched from a public URL into a PDF. Auto-detects the engine from the extension: Office docs (DOCX, XLSX, PPTX, ODT, RTF, TXT, CSV…), images (PNG, JPG, WebP…), HTML, Markdown, or an existing PDF (passthrough). Costs 1 credit on success. Returns the PDF as an embedded resource.
Parameters (9)
- urlstringrequired
Public http(s) URL of the file to download and convert.
- landscapeboolean
Render in landscape orientation. (Pro/Scale/trial only.)
- nativePageRangesstring
Page ranges to include, e.g. "1-3".
- passwordstring
Password to open a protected source document.
- pdfastring
PDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.)
- pdfuaboolean
Produce an accessible PDF/UA document.
- userPasswordstring
Password required to open the resulting PDF.
- ownerPasswordstring
Owner password controlling permissions on the resulting PDF.
- save_pathstring
Optional absolute path to also write the PDF to on disk.
convert_html
Render a raw HTML string to a PDF using Chromium, with optional CSS and layout options. Costs 1 credit on success. Returns the PDF as an embedded resource.
Parameters (18)
- htmlstringrequired
The HTML markup to render.
- cssstring
Optional CSS, injected into the document <head>.
- landscapeboolean
Render in landscape orientation. (Pro/Scale/trial only.)
- paperWidthstring
Paper width in inches, or with a unit e.g. "210mm".
- paperHeightstring
Paper height in inches.
- marginTopstring
Top margin in inches.
- marginBottomstring
Bottom margin in inches.
- marginLeftstring
Left margin in inches.
- marginRightstring
Right margin in inches.
- scalestring
Render scale, 0.1–2.0.
- printBackgroundboolean
Print background graphics/colors.
- preferCssPageSizeboolean
Use the page size declared in CSS @page rules.
- nativePageRangesstring
Page ranges to include, e.g. "1-3,5".
- pdfastring
PDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.)
- pdfuaboolean
Produce an accessible PDF/UA document.
- userPasswordstring
Password required to open the resulting PDF.
- ownerPasswordstring
Owner password controlling permissions on the resulting PDF.
- save_pathstring
Optional absolute path to also write the PDF to on disk.
convert_markdown
Render a raw Markdown string to a PDF, with optional CSS and layout options. A sensible default stylesheet is applied when no CSS is given. Costs 1 credit on success. Returns the PDF as an embedded resource.
Parameters (18)
- markdownstringrequired
The Markdown content to render.
- cssstring
Optional CSS to style the rendered Markdown (overrides the default stylesheet).
- landscapeboolean
Render in landscape orientation. (Pro/Scale/trial only.)
- paperWidthstring
Paper width in inches, or with a unit e.g. "210mm".
- paperHeightstring
Paper height in inches.
- marginTopstring
Top margin in inches.
- marginBottomstring
Bottom margin in inches.
- marginLeftstring
Left margin in inches.
- marginRightstring
Right margin in inches.
- scalestring
Render scale, 0.1–2.0.
- printBackgroundboolean
Print background graphics/colors.
- preferCssPageSizeboolean
Use the page size declared in CSS @page rules.
- nativePageRangesstring
Page ranges to include, e.g. "1-3,5".
- pdfastring
PDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.)
- pdfuaboolean
Produce an accessible PDF/UA document.
- userPasswordstring
Password required to open the resulting PDF.
- ownerPasswordstring
Owner password controlling permissions on the resulting PDF.
- save_pathstring
Optional absolute path to also write the PDF to on disk.
README not available yet.
Install
Configuration
FILETOPDF_API_KEYrequiredsecretYour FileToPDF API key (sk_live_...). Get one free in one click at https://filetopdf.dev.
claude_desktop_config.json
{
"mcpServers": {
"filetopdf-mcp": {
"command": "npx",
"args": [
"-y",
"filetopdf-mcp@0.1.1"
],
"env": {
"FILETOPDF_API_KEY": "<YOUR_FILETOPDF_API_KEY>"
}
}
}
}