# FileToPDF.dev — how to use (mcp.ai)

Connect your FileToPDF.dev account and use 4 tools for documents straight from your AI agent. Connect with your own API key. Convert files, HTML, and Markdown into PDF documents through the FileToPDF.dev API.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_filetopdf?ms=1787291220000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `filetopdf_convert_file_url_to_pdf`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/filetopdf`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/filetopdf/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/filetopdf/convert/file/url/to/pdf` — Convert a file at a public HTTPS URL to PDF, consuming one conversion credit and returning a downloadable PDF. The URL path must end with a supported file extension. Check GET_ACCOUNT_STATUS for remai
  - body: { url: string }
- `POST https://api.mcp.ai/api/filetopdf/convert/html/to/pdf` — Render an HTML string as a PDF, consuming one conversion credit and returning a downloadable PDF. Check GET_ACCOUNT_STATUS for remaining credits.
  - body: { html: string }
- `POST https://api.mcp.ai/api/filetopdf/convert/markdown/to/pdf` — Render a GitHub-Flavored Markdown string as a PDF. A successful conversion consumes one conversion credit and returns a downloadable PDF. Check GET_ACCOUNT_STATUS for remaining credits.
  - body: { markdown: string }
- `POST https://api.mcp.ai/api/filetopdf/get/account/status` — Return the connected FileToPDF workspace plan, subscription status, and remaining conversion credits without consuming a credit.

## Example prompts
- "What can I do in FileToPDF.dev?"
- "Show me a summary of my FileToPDF.dev account"

## More
- Page: https://mcp.ai/filetopdf
- Agent spec (llms.txt): https://mcp.ai/filetopdf/llms.txt
- Postman collection: https://mcp.ai/filetopdf/postman.json
