FileToPDF MCP server
OfficialThe FileToPDF MCP server lets you convert files, HTML, and Markdown to PDF using natural language commands, with options for layout, passwords, and accessibility.
Check account status (
get_account): Verify your API key and view your plan, remaining credits, and subscription status — free, uses no credits.Convert files from a URL (
convert_file): Convert public URLs of Office documents (DOCX, XLSX, PPTX, ODT, RTF, TXT, CSV), images (PNG, JPG, WebP), HTML, Markdown, or existing PDFs into PDFs.Convert raw HTML to PDF (
convert_html): Render HTML strings with optional CSS injection and full layout control (paper size, margins, scale, orientation, print background) using Chromium.Convert raw Markdown to PDF (
convert_markdown): Render Markdown strings to clean PDFs with a sensible default stylesheet (overridable with custom CSS) and the same layout options as HTML conversion.Customize output: Control page orientation, paper dimensions, margins, scale, page ranges, and background printing.
Protect PDFs: Set user and owner passwords to restrict opening or permissions on the output PDF.
Accessibility & archiving: Produce PDF/UA (accessible) or PDF/A (archival) compliant documents (Pro/Scale/trial plans only).
Save locally: Write output PDFs to disk via a
save_pathparameter or theFILETOPDF_OUTPUT_DIRenvironment variable.Cost: Each successful conversion costs 1 credit; errors are free.
Allows CrewAI agents to convert files, HTML, and Markdown to PDF as part of their workflows.
Integrates with LangChain agents to convert files, HTML, and Markdown to PDF.
Enables Langflow workflows to convert files, HTML, and Markdown to PDF.
Allows Make (formerly Integromat) scenarios to convert files, HTML, and Markdown to PDF.
Enables n8n workflows to convert files, HTML, and Markdown to PDF.
Works with OpenAI Agents SDK to convert files, HTML, and Markdown to PDF.
Integrates with Vercel AI SDK to convert files, HTML, and Markdown to PDF.
Allows Zapier Zaps to convert files, HTML, and Markdown to PDF.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FileToPDF MCP server convert this markdown to PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FileToPDF MCP server
A Model Context Protocol server for FileToPDF. It lets any MCP client — Claude Desktop, Claude Code, Cursor, Cline, VS Code, ChatGPT, n8n, Make, or your own agent — convert files, HTML, and Markdown to PDF through natural language: invoices, reports, documentation, DOCX/XLSX/PPTX, images, web pages, and more.
Bring your own API key — get one free, in one click, at https://filetopdf.dev (10 free conversions, no signup required).
Tools
Tool | What it does |
| Check the API key and show plan + remaining credits. Free, no credits used. |
| Convert a file from a public URL (DOCX, XLSX, PPTX, images, HTML, MD, PDF…) to PDF. |
| Render a raw HTML string (with optional CSS + layout options) to a pixel-perfect PDF via Chromium. |
| Render a raw Markdown string (with optional CSS + layout options) to a clean PDF. |
Each convert tool returns a metadata summary and the PDF as an embedded
application/pdf resource (base64), so capable clients can save the file. Set the
FILETOPDF_OUTPUT_DIR env var, or pass save_path, to also write the PDF to disk.
Layout options (landscape, paperWidth/Height, margins, scale, pdfa,
passwords, …) are available on Pro, Scale, and the free trial; on Starter/Basic
they return an upgrade error. Each successful conversion costs 1 credit; errors
are free.
Related MCP server: PDF Manipulation MCP Server
Quick start (local / stdio)
Cursor — one-click install: Add to Cursor (then replace the placeholder with your key).
Claude Desktop / Cline / any stdio client — add to the MCP config
(claude_desktop_config.json, cline_mcp_settings.json, …):
{
"mcpServers": {
"filetopdf": {
"command": "npx",
"args": ["-y", "filetopdf-mcp"],
"env": { "FILETOPDF_API_KEY": "sk_live_YOUR_API_KEY" }
}
}
}Claude Code:
claude mcp add filetopdf -e FILETOPDF_API_KEY=sk_live_YOUR_API_KEY -- npx -y filetopdf-mcpVS Code (.vscode/mcp.json or via MCP: Add Server):
{
"servers": {
"filetopdf": {
"type": "stdio",
"command": "npx",
"args": ["-y", "filetopdf-mcp"],
"env": { "FILETOPDF_API_KEY": "sk_live_YOUR_API_KEY" }
}
}
}Hosted / remote (Streamable HTTP) — no install
A hosted endpoint is available at https://api.filetopdf.dev/mcp. Authenticate
with your own key via the x-api-key header, an Authorization: Bearer header, or
an ?apiKey= query parameter.
{
"mcpServers": {
"filetopdf": {
"type": "streamable-http",
"url": "https://api.filetopdf.dev/mcp",
"headers": { "x-api-key": "sk_live_YOUR_API_KEY" }
}
}
}This is also the URL to paste into any platform with an MCP client step — n8n (MCP Client Tool), Make (MCP Client), Zapier (MCP Client beta), Relay.app (Call MCP tool), Flowise, Langflow, Dify, LibreChat, AnythingLLM, or agent frameworks (OpenAI Agents SDK, LangChain, CrewAI, Vercel AI SDK).
To self-host instead:
npm run build && npm run start:http # listens on $PORT (default 8080) at /mcpA Dockerfile is included for container hosting (Smithery, Fly, Render, Cloud Run).
Develop & test
npm install
npm run build # tsc -> dist/
npm test # spawns the built stdio server, runs a live conversionnpm test reads FILETOPDF_API_KEY, or API_KEY= from a gitignored .env.
Links
Website & instant free API key: https://filetopdf.dev
API docs: https://filetopdf.dev/documentation
Official MCP registry name:
dev.filetopdf/filetopdf-mcp
License
Available Tools
4 toolsconvert_fileConvert a file (by URL) to PDFAInspect
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.
Inputs: url (required), landscape, nativePageRanges, password, +5 more.
convert_htmlConvert HTML to PDFAInspect
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.
Inputs: html (required), css, landscape, paperWidth, +14 more.
convert_markdownConvert Markdown to PDFAInspect
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.
Inputs: markdown (required), css, landscape, paperWidth, +14 more.
get_accountGet FileToPDF account statusARead-onlyInspect
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.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each conversion tool targets a distinct input type (URL-based files, raw HTML, raw Markdown), and get_account is separate. No overlap.
All tool names follow a consistent verb_noun pattern (convert_file, convert_html, convert_markdown, get_account).
Four tools is appropriate for a focused PDF conversion server, covering the main conversion methods and account info.
The tool surface covers all major conversion paths (URL-based auto-detection, raw HTML, raw Markdown) and account verification, with no obvious gaps.
Maintenance
Related MCP Connectors
File tools for your AI chat: PDF tables to Excel, merge PDFs, images to PDF, fill PDF forms.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Turn HTML or Markdown into a clean, styled PDF and get a download link.
Convert PDF URLs to clean Markdown and text for RAG and LLM input. Pay per PDF on Apify.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables PDF generation from URLs or HTML strings through the Yakpdf API, allowing users to convert web content into PDF documents.1MIT
- AlicenseBqualityDmaintenanceEnables PDF manipulation including text, images, annotations, form fields, page operations, and metadata through natural language.16MIT
- AlicenseCqualityDmaintenanceEnables AI assistants to perform PDF operations like merge, split, compress, convert, encrypt, OCR, and summarize using natural language.9815 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to generate PDFs from templates using dynamic data, manage async PDF jobs, list templates, and check account credits and transaction history through natural language.66 npmMIT