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 "Install 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 serverconvert 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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) URL of the file to download and convert. | |
| landscape | No | Render in landscape orientation. (Pro/Scale/trial only.) | |
| nativePageRanges | No | Page ranges to include, e.g. "1-3". | |
| password | No | Password to open a protected source document. | |
| pdfa | No | PDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.) | |
| pdfua | No | Produce an accessible PDF/UA document. | |
| userPassword | No | Password required to open the resulting PDF. | |
| ownerPassword | No | Owner password controlling permissions on the resulting PDF. | |
| save_path | No | Optional absolute path to also write the PDF to on disk. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses credit cost, return format (embedded resource), and auto-detection behavior. Annotations include 'openWorldHint: true', which is consistent with credit deduction. No contradictions, but error cases or timeouts are not mentioned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core purpose. Every sentence adds necessary information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 9 parameters and no output schema, the description explains the main workflow, supported formats, cost, and return type. It omits high-level guidance for optional parameters like page ranges or passwords, but the parameter descriptions cover those.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining auto-detection and listing supported file types, enriching understanding beyond individual parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Convert a file fetched from a public URL into a PDF' with a specific verb and resource. It lists supported file types but does not explicitly differentiate from sibling tools convert_html and convert_markdown, which are more specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description covers when to use the tool (converting a file from a public URL to PDF) but lacks guidance on when not to use it or how it compares to siblings. No alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | The HTML markup to render. | |
| css | No | Optional CSS, injected into the document <head>. | |
| landscape | No | Render in landscape orientation. (Pro/Scale/trial only.) | |
| paperWidth | No | Paper width in inches, or with a unit e.g. "210mm". | |
| paperHeight | No | Paper height in inches. | |
| marginTop | No | Top margin in inches. | |
| marginBottom | No | Bottom margin in inches. | |
| marginLeft | No | Left margin in inches. | |
| marginRight | No | Right margin in inches. | |
| scale | No | Render scale, 0.1–2.0. | |
| printBackground | No | Print background graphics/colors. | |
| preferCssPageSize | No | Use the page size declared in CSS @page rules. | |
| nativePageRanges | No | Page ranges to include, e.g. "1-3,5". | |
| pdfa | No | PDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.) | |
| pdfua | No | Produce an accessible PDF/UA document. | |
| userPassword | No | Password required to open the resulting PDF. | |
| ownerPassword | No | Owner password controlling permissions on the resulting PDF. | |
| save_path | No | Optional absolute path to also write the PDF to on disk. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses cost (1 credit on success) and return format (embedded resource), which adds value beyond openWorldHint annotation. However, it does not mention any side effects or constraints like HTML size limits or timeout.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with core info: purpose, method (Chromium), optional features, cost, and return type. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 18 parameters and no output schema, description covers main purpose but does not clarify what 'embedded resource' means (e.g., base64 encoded) or provide additional context for complex layout options.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 18 parameters have descriptions in the schema (100% coverage), so the description adds minimal extra meaning beyond 'optional CSS and layout options'. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it renders HTML to PDF using Chromium, with optional CSS and layout options. This distinguishes it from siblings like convert_file and convert_markdown.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like convert_file or convert_markdown. The description does not mention when raw HTML input is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | The Markdown content to render. | |
| css | No | Optional CSS to style the rendered Markdown (overrides the default stylesheet). | |
| landscape | No | Render in landscape orientation. (Pro/Scale/trial only.) | |
| paperWidth | No | Paper width in inches, or with a unit e.g. "210mm". | |
| paperHeight | No | Paper height in inches. | |
| marginTop | No | Top margin in inches. | |
| marginBottom | No | Bottom margin in inches. | |
| marginLeft | No | Left margin in inches. | |
| marginRight | No | Right margin in inches. | |
| scale | No | Render scale, 0.1–2.0. | |
| printBackground | No | Print background graphics/colors. | |
| preferCssPageSize | No | Use the page size declared in CSS @page rules. | |
| nativePageRanges | No | Page ranges to include, e.g. "1-3,5". | |
| pdfa | No | PDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.) | |
| pdfua | No | Produce an accessible PDF/UA document. | |
| userPassword | No | Password required to open the resulting PDF. | |
| ownerPassword | No | Owner password controlling permissions on the resulting PDF. | |
| save_path | No | Optional absolute path to also write the PDF to on disk. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds that a sensible default stylesheet is applied and costs 1 credit, and returns PDF as an embedded resource. Annotations only provide openWorldHint=true, so description adds useful context but could disclose more behavioral details like error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loading the action ('Render...PDF') and then adding key details. No redundant information, every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite 18 parameters and no output schema, the description mentions return format and credit cost. However, it omits important context like error behavior, maximum input size, or support for advanced options like headers/footers. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the baseline is 3. The description provides a high-level overview of parameters (CSS, layout options) but does not add meaningful detail beyond what the schema already provides for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it 'Render a raw Markdown string to a PDF' – a specific verb and resource. It distinguishes from siblings like convert_html and convert_file by specifying Markdown as input and PDF as output.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (when converting Markdown to PDF) and mentions a default stylesheet, but lacks explicit guidance on when not to use it or alternatives (e.g., convert_html for HTML input).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond annotations (readOnlyHint, openWorldHint), description adds that it is free and what is returned, providing useful context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no waste, front-loaded with action verb and purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter tool with annotations, description covers purpose, usage, and return values adequately.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters in schema; description confirms no input needed, meeting the baseline expectation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool checks API key and returns account details, and distinguishes from sibling conversion tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use for verifying connection, but no when-not or alternatives are mentioned; siblings are distinct enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
convert_file - First observed
convert_html - First observed
convert_markdown - First observed
get_account
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Turn HTML or Markdown into a clean, styled PDF and get a download link.
Convert, merge, compress, OCR, redact, and sign PDFs inside your AI assistant. From pdfAssistant.
Cloud PDF generation from HTML, CSS and XSL-FO, with PDF/A and PDF/UA support.
File conversion: PDF, DOCX, STT, TTS, watermarking
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
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to convert Markdown files and content to beautifully formatted PDF documents using Playwright's Chromium engine.89MIT
- AlicenseCqualityBmaintenanceEnables AI assistants to perform PDF operations like merge, split, compress, convert, encrypt, OCR, and summarize using natural language.9824MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FileToPDF/filetopdf-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server