MCP server for HTML2PDF Converter
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.
You can run this MCP server directly via npx in any MCP-compatible client.
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"
}
}
}
}
In Cursor, go to Settings > MCP Servers and add a new server:
npx -y @html2pdfconverter/mcp-serverHTML2PDF_API_KEY=YOUR_API_KEY_HEREgenerate_pdf: Converts a URL or raw HTML string into a PDF and saves it to a temporary file, returning the file path.# Install dependencies
npm install
# Build
npm run build
# Run locally (requires HTML2PDF_API_KEY env var)
HTML2PDF_API_KEY=your_key npm start
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @html2pdfconverter/mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-html2pdfconverter-mcp-server": {
"command": "npx",
"args": [
"-y",
"@html2pdfconverter/mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@html2pdfconverter/mcp-servernpmio.github.html2pdfconverter/mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.