PDF MCP server for Claude, ChatGPT and Cursor
PDF MCP server: a remote server that lets Claude, ChatGPT, Cursor and Claude Code turn HTML or any URL into a PDF. No install, just one URL.
Quick answer. Add the remote server at https://html-pdf.com/mcp to your MCP client. In Claude Code, run this one command, then ask the agent for a PDF.
claude mcp add --transport http html-pdf https://html-pdf.com/mcp --header "Authorization: Bearer $HTML_PDF_KEY"
What a PDF MCP server does
This section explains what the server adds to your agent. MCP (Model Context Protocol) is how AI agents get new tools, and a PDF MCP server gives your agent a tool like html_to_pdf.
The agent writes the document as HTML and CSS (invoices, reports, proposals, certificates). The server renders it with headless Chrome and hands back a PDF.
That's different from an agent drawing a PDF with Python libraries in a sandbox. HTML and CSS give you real layout (flexbox, grid, web fonts, tables that break cleanly across pages), so the result looks like a designed document.
Remote vs local MCP servers
This comparison helps you pick the right kind of server. Most PDF MCP servers you'll find are local. You install them with npx or pip, and they run a browser on your machine.
| remote (html-pdf.com) | local (npx / pip) | |
|---|---|---|
| install | none, add a URL | Node or Python + a Chromium download |
| works in Claude.ai / ChatGPT web | yes | no (needs a local process) |
| works on teammates' machines | same URL for everyone | each person installs it |
| updates | automatic | you update the package |
| cost | per page (100 free) | free, uses your CPU/RAM |
Local servers are a good fit when documents must never leave your machine. For everything else, a remote server is simpler.
html-pdf.com MCP server
These are the connection details and the tools your agent gets. The endpoint uses Streamable HTTP.
https://html-pdf.com/mcp
Auth: OAuth 2.1 login (Claude.ai, ChatGPT and Claude Code ask you to log in when you connect), a header Authorization: Bearer <API key>, or https://html-pdf.com/mcp?api_key=<key> for clients that only accept a URL.
No key yet? You don't need one. Add the server URL and your client opens an html-pdf.com login. New accounts get 100 free credits.
Tools
| tool | what it does |
|---|---|
html_to_pdf |
Render HTML to PDF. Returns a download link (24 h), page count and credits left. Options: format, landscape, margin, css, header/footer with page numbers, wait for JS, max pages. |
url_to_pdf |
Render a public web page to PDF. |
get_credits |
Remaining credits. |
buy_credits |
A Stripe payment link for a credit pack, to hand to the user. |
Connect it
This section has the setup for the most common clients.
One click: Add to Cursor · Add to VS Code. Both log you in with OAuth, so there's no key to paste.
Claude Code
claude mcp add --transport http html-pdf https://html-pdf.com/mcp --header "Authorization: Bearer $HTML_PDF_KEY"
Cursor (~/.cursor/mcp.json)
{ "mcpServers": { "html-pdf": { "url": "https://html-pdf.com/mcp", "headers": { "Authorization": "Bearer hp_live_..." } } } }
Claude.ai / Claude Desktop. Add a custom connector with https://html-pdf.com/mcp, click Connect and log in.
Step-by-step for every client: Claude · Claude Code · ChatGPT · Cursor · VS Code · Codex.
Prompts that work well
These example prompts show what you can ask once the server is connected.
- "Make a one-page A4 invoice for Acme: 3 hours of consulting at $120, due in 30 days. Use a clean modern layout."
- "Turn this meeting summary into a two-page PDF report with a title page and page numbers in the footer."
- "Save https://example.com/pricing as a PDF in landscape."
- "How many html-pdf credits do I have left?"
Tip: ask for "a complete HTML document with inline CSS" if you want to tweak the design before rendering.
Pricing
This is what the MCP server costs. 1 credit = 1 PDF page. You get 100 free pages, then packs from $10 for 1,000 pages down to $0.005 per page.
There is no subscription, and purchased credits never expire. That suits agents whose usage comes in bursts.
Get a free API key · MCP reference · API docs
FAQ
How do I add a PDF MCP server to Claude Code?
Run claude mcp add --transport http html-pdf https://html-pdf.com/mcp --header "Authorization: Bearer $HTML_PDF_KEY". The agent can then call html_to_pdf and url_to_pdf.
Does the PDF MCP server work in Claude.ai and ChatGPT on the web?
Yes. It is a remote server, so you add it as a custom connector with https://html-pdf.com/mcp, log in with OAuth, and nothing runs on your machine.
Do I need an API key to use the PDF MCP server?
No. Add the server URL and your client opens an html-pdf.com login (OAuth). New accounts get 100 free credits and no card is needed.
How long do the PDF download links last?
Download links returned by html_to_pdf and url_to_pdf last 24 hours. Your HTML is not stored.
