mcp-html2pdfconverter
OfficialHTML2PDF Converter MCP Server
An MCP (Model Context Protocol) server for HTML2PDF Converter. This server exposes a generate_pdf tool, allowing AI models like Claude, Cursor, and others to seamlessly convert HTML or URLs to PDF documents on your behalf.
Requirements
Node.js >= 18
An HTML2PDF Converter API Key (get one at https://html2pdfconverter.com)
Related MCP server: polydoc-mcp
Usage
You can run this MCP server directly via npx in any MCP-compatible client.
Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"html2pdf": {
"command": "npx",
"args": ["-y", "@html2pdfconverter/mcp-server"],
"env": {
"HTML2PDF_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Cursor Configuration
In Cursor, go to Settings > MCP Servers and add a new server:
Type: command
Command:
npx -y @html2pdfconverter/mcp-serverEnvironment Variables:
HTML2PDF_API_KEY=YOUR_API_KEY_HERE
Available Tools
generate_pdf: Converts a URL or raw HTML string into a PDF and saves it to a temporary file, returning the file path.
Development
# Install dependencies
npm install
# Build
npm run build
# Run locally (requires HTML2PDF_API_KEY env var)
HTML2PDF_API_KEY=your_key npm startAvailable Tools
2 toolscheck_pdf_statusA
Check the status of a pending PDF conversion job. If it is completed, this will download the PDF and return the file path.
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The Job ID returned by submit_pdf_job |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It explains the completed case (downloads PDF, returns file path) but does not describe behavior for pending or failed jobs, nor any side effects beyond downloading. This is a notable gap in transparency.
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 a single concise sentence that quickly communicates the tool's purpose and completion behavior without any fluff or redundant information.
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 one-parameter tool with no output schema, the description adequately explains the primary function and the successful outcome. However, it does not specify what happens when the job is not completed, leaving a minor gap in completeness.
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?
The schema already provides 100% coverage for 'jobId' with a clear description. The tool description adds no additional parameter semantics beyond referencing the job ID context, so the baseline of 3 applies.
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 uses specific verb 'Check' and resource 'status of a pending PDF conversion job', clearly distinguishing it from the sibling 'submit_pdf_job'. It also mentions the download and file path return, making the tool's function unambiguous.
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 usage after submitting a job, referencing the job ID from 'submit_pdf_job'. It gives clear context but does not explicitly state when not to use or mention alternatives. Given the single sibling, this is sufficient guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
submit_pdf_jobA
Submit a webpage URL or HTML to be converted to a PDF asynchronously. This will return a Job ID. You MUST then use the check_pdf_status tool to poll the status and download the PDF.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | The URL of the webpage to convert to PDF. Use this OR html. | |
| html | No | The raw HTML string to convert to PDF. Use this OR url. | |
| format | No | The paper format (e.g. A4, Letter). Defaults to A4. | |
| printBackground | No | Whether to print background graphics. Defaults to true. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses key behaviors: asynchronous execution, returning a Job ID, and requiring a follow-up poll. While it doesn't mention failure modes or permissions, the essential operational behavior is transparent and goes beyond what the schema provides.
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, no filler. The primary action is front-loaded, and the critical follow-up instruction is included without 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?
For a tool with 4 parameters, no output schema, and no annotations, the description covers the essential workflow: submit, get Job ID, poll status, download PDF. It could add error-case or timeout details, but the core context is sufficiently complete for an agent to use it correctly.
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?
The input schema already has 100% description coverage for all 4 parameters. The description adds no new parameter meaning beyond echoing 'URL or HTML' which is already clearly documented in the schema. This baseline 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?
The description clearly states the tool's function: 'Submit a webpage URL or HTML to be converted to a PDF asynchronously.' It uses a specific verb ('Submit') and names the exact resource (URL/HTML to PDF). It also distinguishes from the sibling tool by stating it returns a Job ID and explicitly directs the agent to use check_pdf_status afterward.
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 explicitly says 'You MUST then use the check_pdf_status tool to poll the status and download the PDF,' which clearly defines when this tool should be used (submission) versus the alternative (polling/downloading). This is unambiguous and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
submit_pdf_job and check_pdf_status have clearly distinct roles: one creates a job, the other retrieves its result. No overlap in functionality.
Both tools follow the same verb_noun pattern with snake_case (submit_pdf_job, check_pdf_status), making their relationship and intent immediately clear.
With only two tools, the server is minimal but covers the core conversion workflow. It feels slightly thin but is functional for a simple service.
The tool set covers the full job lifecycle: submit a conversion job and poll for the result. No obvious gaps for the stated HTML-to-PDF conversion purpose.
Maintenance
Related MCP Connectors
HTML-to-PDF MCP server — render pixel-faithful PDFs from HTML.
MCP tools for AI agents: render URLs to image/PDF, check link health, convert HTML/CSV/JSON.
MCP server for Api2Pdf — generate PDFs & images from HTML, URLs or office files; merge, barcodes.
Htmlpdf Transform Mcp connects AI agents to real public APIs via MCP. Tools include
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides multiple file conversion tools for AI agents, supporting various document and image format conversions including DOCX to PDF, PDF to DOCX, image conversions, Excel to CSV, HTML to PDF, and Markdown to PDF.24MIT

polydoc-mcpofficial
AlicenseNot gradedqualityCmaintenanceMCP server that converts HTML or URLs to PDF, captures screenshots, and generates EU-compliant e-invoices (Factur-X/ZUGFeRD).65MIT
okraPDF PDF MCP serverofficial
AlicenseAqualityCmaintenanceThis MCP server enables AI agents to view PDFs as accessible HTML with bounding-box citations, and provides tools for layout-aware parsing, schema extraction, cross-document Q&A, and PDF rendering.27MIT
CustomJS MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceA remote MCP server that enables AI agents to host HTML pages, generate PDFs, capture screenshots, scrape sites, and run sandboxed code using a CustomJS API key.MIT
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/html2pdfconverter/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server