Skip to main content
Glama
html2pdfconverter

mcp-html2pdfconverter

Official

HTML2PDF 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

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-server

  • Environment 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 start

Available Tools

2 tools
check_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
jobIdYesThe Job ID returned by submit_pdf_job

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlNoThe URL of the webpage to convert to PDF. Use this OR html.
htmlNoThe raw HTML string to convert to PDF. Use this OR url.
formatNoThe paper format (e.g. A4, Letter). Defaults to A4.
printBackgroundNoWhether to print background graphics. Defaults to true.

TDQS

A4.4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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

A4.2/5.0
Disambiguation5/5

submit_pdf_job and check_pdf_status have clearly distinct roles: one creates a job, the other retrieves its result. No overlap in functionality.

Naming Consistency5/5

Both tools follow the same verb_noun pattern with snake_case (submit_pdf_job, check_pdf_status), making their relationship and intent immediately clear.

Tool Count3/5

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.

Completeness5/5

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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.
    24
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that converts HTML or URLs to PDF, captures screenshots, and generates EU-compliant e-invoices (Factur-X/ZUGFeRD).
    65
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    This 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.
    27
    MIT

Latest Blog Posts

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