# MCP Server

> MCP Server is an MCP server for files and documents. MCP server that lets AI clients turn HTML or URLs into PDF files via an API key. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, API
- **Repository:** https://github.com/html2pdfconverter/mcp-server
- **MCP Registry name:** io.github.html2pdfconverter/mcp-server
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-11-18

## About

The README describes this as a Model Context Protocol server that wraps the HTML2PDF Converter service, so AI assistants such as Claude Desktop or Cursor can request PDF output on a user's behalf. Its single exposed tool accepts either a URL or a raw HTML string and writes the resulting PDF to a temporary file, returning the file path to the client.

Setup runs through npx with the npm package @html2pdfconverter/mcp-server, which requires Node.js 18 or newer. The service itself needs an HTML2PDF Converter API key, passed as an environment variable; the registry marks that key as required and secret. Configuration snippets for Claude Desktop and Cursor are included in the README.

It suits developers and teams who already use an MCP-capable assistant and want document generation from HTML inside that workflow rather than through a separate web interface.

## Features

- **Single PDF generation tool:** Exposes a generate_pdf tool that converts a URL or raw HTML into a PDF.
- **URL or HTML input:** Accepts either a web address or an HTML string as the source for the document.
- **Temporary file output:** Saves the generated PDF to a temporary file and returns its path to the client.
- **npx-based installation:** Runs directly through npx with no local install step beyond Node.js 18+.
- **API key configuration:** Reads the HTML2PDF Converter API key from an environment variable, marked as secret in the registry.

## Good for

- Letting an AI assistant export a web page or HTML snippet as a PDF during a conversation
- Automating PDF creation of reports or invoices written as HTML from within an MCP client
- Converting a live URL to PDF as part of a multi-step assistant workflow

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-server --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @html2pdfconverter/mcp-server
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@html2pdfconverter/mcp-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@html2pdfconverter/mcp-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@html2pdfconverter/mcp-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@html2pdfconverter/mcp-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@html2pdfconverter/mcp-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

## Tools

- `generate_pdf`: Converts a URL or raw HTML string into a PDF and saves it to a temporary file, returning the file path.

## FAQ

### What tool does the server expose?

The README lists one tool, generate_pdf, which converts a URL or raw HTML string into a PDF saved to a temporary file.

### What do I need to run it?

Node.js 18 or newer and an HTML2PDF Converter API key, which the README says is obtained from the service's website.

### Which AI clients are covered?

The README gives configuration steps for Claude Desktop and Cursor and says it works with other MCP-compatible clients.

### How do I add MCP Server to Claude Code?

Run this command in your terminal: claude mcp add mcp-server --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @html2pdfconverter/mcp-server

### What are the best alternatives to MCP Server?

The closest alternatives to MCP Server are Api2Pdf MCP by usefulapi, MCP Server, DocRaptor MCP by usefulapi, Anvil MCP by usefulapi and Mindlm MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Api2Pdf MCP by usefulapi](https://ai-powered.com/mcp/api2pdf-mcp-by-usefulapi): Api2Pdf MCP by usefulapi is a freemium MCP server for files and documents.
- [MCP Server](https://ai-powered.com/mcp/mcp-server-46): MCP Server is an MCP server for files and documents.
- [DocRaptor MCP by usefulapi](https://ai-powered.com/mcp/docraptor-mcp-by-usefulapi): DocRaptor MCP by usefulapi is a freemium MCP server for files and documents.
- [Anvil MCP by usefulapi](https://ai-powered.com/mcp/anvil-mcp-by-usefulapi): Anvil MCP by usefulapi is a freemium MCP server for files and documents.
- [Mindlm MCP](https://ai-powered.com/mcp/mindlm-mcp): Mindlm MCP is a free MCP server for productivity.
- [CraftMyPDF MCP by usefulapi](https://ai-powered.com/mcp/craftmypdf-mcp-by-usefulapi): CraftMyPDF MCP by usefulapi is a freemium MCP server for files and documents.
- [APITemplate.io MCP by usefulapi](https://ai-powered.com/mcp/apitemplate-io-mcp-by-usefulapi): APITemplate.io MCP by usefulapi is a freemium MCP server for files and documents.
- [MCP Server Filesystem](https://ai-powered.com/mcp/mcp-server-filesystem): MCP Server Filesystem is an open-source MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/mcp-server-mweo98qx
