FileToPDF

dev.filetopdfPublished by filetopdf.devOfficial publisherv0.1.1Updated Nov 2, 2026

Convert files, HTML, and Markdown to PDF via the FileToPDF API. Bring your own API key.

VerifiedStreamable HTTPWeb executableFiles & StorageDeveloper Tools

Overview

AI-generated overview

FileToPDF converts files, HTML and Markdown into PDFs through the FileToPDF API, returning each PDF as an embedded resource the assistant can hand back.

What you can do
  • Convert a file from a public URL to PDF, auto-detecting Office documents, images, HTML, Markdown or existing PDFs
  • Render raw HTML strings to PDF via Chromium with optional CSS and layout options
  • Render raw Markdown strings to PDF, with a default stylesheet when no CSS is given
  • Check the API key and see plan, remaining conversion credits and subscription status
When to use it
Useful when you want an assistant to turn invoices, reports, documentation, DOCX/XLSX/PPTX files, images or web pages into PDFs on request, either from a URL or from HTML/Markdown text it generates.
Requirements
A FileToPDF API key, supplied as the FILETOPDF_API_KEY environment variable for the local npm package or as the x-api-key header for the hosted endpoint. Runs either as a remote Streamable HTTP endpoint or locally via npx with Node.js. Network access to the FileToPDF API is required.
Before you install
Every successful conversion spends 1 credit from your account, so usage costs money beyond the free allowance; errors are free. The API key is a secret passed in configuration. Files are fetched from public URLs and content is sent to the third-party FileToPDF service. Some layout options (landscape, paper size, margins, scale, PDF/A, passwords) are limited to higher plans. Setting FILETOPDF_OUTPUT_DIR or save_path writes PDFs to disk.

Installation

In SourceWeft

  1. Open FileToPDF in the dashboard and add it to a workspace.
  2. Connect x-api-key credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/dev.filetopdf%2Ffiletopdf-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "filetopdf": {
      "type": "http",
      "url": "https://api.filetopdf.dev/mcp",
      "headers": {
        "x-api-key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

FileToPDF MCP server

[npm] [smithery badge] [Install 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

ToolWhat it does
get_accountCheck the API key and show plan + remaining credits. Free, no credits used.
convert_fileConvert a file from a public URL (DOCX, XLSX, PPTX, images, HTML, MD, PDF…) to PDF.
convert_htmlRender a raw HTML string (with optional CSS + layout options) to a pixel-perfect PDF via Chromium.
convert_markdownRender 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.

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, …):

json
{  "mcpServers": {    "filetopdf": {      "command": "npx",      "args": ["-y", "filetopdf-mcp"],      "env": { "FILETOPDF_API_KEY": "sk_live_YOUR_API_KEY" }    }  }}

Claude Code:

bash
claude mcp add filetopdf -e FILETOPDF_API_KEY=sk_live_YOUR_API_KEY -- npx -y filetopdf-mcp

VS Code (.vscode/mcp.json or via MCP: Add Server):

json
{  "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.

json
{  "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:

bash
npm run build && npm run start:http   # listens on $PORT (default 8080) at /mcp

A Dockerfile is included for container hosting (Smithery, Fly, Render, Cloud Run).

Develop & test

bash
npm installnpm run build          # tsc -> dist/npm test               # spawns the built stdio server, runs a live conversion

npm test reads FILETOPDF_API_KEY, or API_KEY= from a gitignored .env.

Links

License

MIT

Source: README.md at commit 1008c3d

Tools

4

get_account

Get FileToPDF account status

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.

Takes no parameters.

convert_file

Convert a file (by URL) to PDF

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.

Parametersurlrequiredpdfapdfuapasswordlandscapesave_pathuserPasswordownerPasswordnativePageRanges

convert_html

Convert HTML to PDF

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.

ParameterscsshtmlrequiredpdfapdfuascalelandscapemarginTopsave_pathmarginLeftpaperWidthmarginRightpaperHeight+6 more

convert_markdown

Convert Markdown to PDF

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.

ParameterscsspdfapdfuascalemarkdownrequiredlandscapemarginTopsave_pathmarginLeftpaperWidthmarginRightpaperHeight+6 more

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts