MCP Server

Use PDF tools directly in Claude

The sample-pdf.com MCP server connects Claude Desktop, Cursor, and any MCP-compatible AI assistant to all PDF tools on this site — generate, convert, and download PDFs without leaving your conversation.

Available tools

generate_sample_pdf Generate a PDF of any size from 1 KB to 50 MB.
convert_html_to_pdf Convert an HTML string to a PDF via headless Chrome. Supports CSS3, web fonts, and base64 images.
download_sample_pdf Download a pre-built sample PDF file (10 KB, 1 MB, 10 MB, 20 MB).

Prerequisites

  • Claude Desktop 1.0+claude.ai/download
  • No additional software required — the MCP server runs directly on sample-pdf.com

1. Configure Claude Desktop

Edit your Claude Desktop configuration file and add the sample-pdf entry:

Windows %APPDATA%\Claude\claude_desktop_config.json
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "sample-pdf": {
      "type": "sse",
      "url": "https://sample-pdf.com/mcp"
    }
  }
}

The server connects directly to sample-pdf.com — no local installation needed.

2. Restart Claude Desktop

Fully quit and reopen Claude Desktop. The server will appear in the tools panel — look for the sample-pdf entry.

Example prompts

"Generate a 5 MB sample PDF file"
"Convert this HTML to a PDF: <h1>Report</h1><p>Content here.</p>"
"Download a 1 MB sample PDF"
"Create a PDF invoice from this HTML template and save it"

Environment variables

Variable Default Description
SAMPLE_PDF_API_URL http://localhost:5037 Base URL of the sample-pdf.com API

REST API & ChatGPT Actions

All tools are also available as a REST API with a full OpenAPI 3.0 specification — compatible with ChatGPT Actions, n8n, Make, Zapier, and any HTTP client.