# FileToPDF/filetopdf-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/FileToPDF/filetopdf-mcp  
**GitHub Stars:** 2  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/filetopdf-filetopdf-mcp

## Description
Convert files (DOCX, XLSX, PPTX, images…), HTML, and Markdown to pixel-perfect PDFs via the FileToPDF API. Returns the PDF as an embedded resource or saves it to disk. Runs via npx filetopdf-mcp or a hosted Streamable HTTP endpoint; free API key in one click.

## Tools
Capabilities this server exposes over MCP:

- **get_account** — Check the FileToPDF connection and return the plan, remaining conversion credits, and subscription status. Free — never costs credits. Call it to verify the API key works, or after a failed conversion to see whether credits ran out. No API key yet? Anyone can get one free, in one click, at https://filetopdf.dev (10 free conversions, no signup).
- **convert_file** — Convert a document at a public URL into a PDF. Handles Office documents (DOCX, XLSX, PPTX, ODT, RTF, TXT, CSV…), images (PNG, JPG, WebP…), web pages/HTML files, Markdown files, and existing PDFs (passthrough) — the conversion engine is auto-detected from the file extension. Use this when the source lives at a URL; for raw HTML or Markdown strings use convert_html / convert_markdown instead. Returns the PDF as an embedded application/pdf resource (optionally also written to disk via save_path). Costs 1 credit on success; failed conversions are free.
- **convert_html** — Render a raw HTML string into a pixel-perfect PDF with a real Chromium engine — ideal for generating invoices, reports, receipts, certificates, letters, and other documents from templates. Optional css is injected into the document <head>; full layout control via paper size, margins, landscape, scale, page ranges, background printing, PDF/A archival conformance, and password protection. Returns the PDF as an embedded application/pdf resource (optionally also written to disk via save_path). Costs 1 credit on success; failed conversions are free.
- **convert_markdown** — Render a Markdown string into a clean, professional PDF — the fastest way to turn notes, reports, documentation, summaries, or any agent-written text into a shareable document. A sensible default stylesheet is applied when no css is given; pass custom CSS to fully control typography and branding, plus layout options (paper size, margins, landscape, page ranges, PDF/A, passwords). Returns the PDF as an embedded application/pdf resource (optionally also written to disk via save_path). Costs 1 credit on success; failed conversions are free.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `FILETOPDF_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What FileToPDF/filetopdf-mcp MCP server does

FileToPDF/filetopdf-mcp MCP server gives MCP clients access to FileToPDF document conversion. It can turn publicly accessible office files, images, HTML pages, Markdown, and existing PDFs into PDF output. Supported source examples include DOCX, XLSX, PPTX, ODT, RTF, TXT, CSV, PNG, JPG, and WebP files.

The server is suited to agents that need to produce shareable documents from generated content or convert an existing resource available at a public URL. Common outputs include invoices, reports, receipts, certificates, letters, summaries, and documentation.

## How it works

The server communicates with the FileToPDF API using an API key. For a file URL, the conversion engine is selected from the source file extension. Raw HTML and Markdown use dedicated tools so the agent can provide the content directly instead of hosting it first.

Successful conversion calls return metadata together with the PDF as an embedded `application/pdf` resource. A client that supports embedded resources can save the result, and the caller can also provide `save_path` to write the PDF locally. The `FILETOPDF_OUTPUT_DIR` environment variable can be used to configure an output directory.

HTML and Markdown rendering use a Chromium-based engine. Both formats accept optional CSS and document layout settings, including paper dimensions, margins, landscape orientation, scaling, page ranges, background printing, PDF/A output, and password protection. Markdown receives a default stylesheet when custom CSS is not supplied.

## Setup and configuration

For a local stdio deployment, run the package with `npx -y filetopdf-mcp` and provide `FILETOPDF_API_KEY` in the MCP client environment. The repository documents configuration for Claude Desktop, Cline, Cursor, VS Code, and Claude Code. The API key can be obtained from FileToPDF, which provides 10 free conversions without signup.

A hosted Streamable HTTP endpoint is also available at `https://api.filetopdf.dev/mcp`. Remote clients can authenticate with an `x-api-key` header, an `Authorization: Bearer` header, or an `apiKey` query parameter. The project also documents self-hosting its HTTP mode with `npm run build && npm run start:http`; the service listens on the `PORT` value, defaulting to 8080, and serves `/mcp`.

## Tools and capabilities

FileToPDF/filetopdf-mcp MCP server exposes four tools:

- `get_account` checks the API key and reports the plan, remaining conversion credits, and subscription status. This check does not consume credits.
- `convert_file` converts a document at a public URL. Existing PDFs pass through the conversion service, while other supported formats are converted according to their extensions.
- `convert_html` renders a supplied HTML string, with optional CSS and PDF layout controls.
- `convert_markdown` renders a supplied Markdown string, with optional CSS and PDF layout controls.

## Limitations and notes

An API key is required for the FileToPDF service. Each successful conversion consumes one credit, while failed conversions do not. The free allowance covers 10 conversions; the documentation also references Starter, Basic, Pro, and Scale plans. Advanced layout settings are available on the free trial and Pro or Scale plans, but return an upgrade error on Starter and Basic.

The `convert_file` tool requires a public URL, so it is not the direct route for private local files. Use `convert_html` or `convert_markdown` when the source is a raw string. The repository is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/filetopdf-filetopdf-mcp/readme_

