JSPM

pdfspark-mcp

1.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q60942F
  • License MIT

MCP server for PDFSpark — convert HTML/URLs to PDF from AI assistants like Claude, Cursor, VS Code

Package Exports

  • pdfspark-mcp
  • pdfspark-mcp/mcp-server.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pdfspark-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PDFSpark MCP Server

npm version Website API Status

Convert HTML and webpages to PDF directly from AI assistants like Claude, Cursor, and VS Code.

PDFSpark MCP Server connects AI tools to the PDFSpark API using the Model Context Protocol. Generate, merge, split, and inspect PDFs without leaving your AI workflow.

Quick Start

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "pdfspark": {
      "command": "npx",
      "args": ["-y", "pdfspark-mcp"]
    }
  }
}

Then ask Claude things like:

  • "Convert this HTML report to a PDF with landscape orientation"
  • "Save https://example.com as a PDF with A3 paper size"
  • "Merge these two PDFs into one document"
  • "Extract pages 1-3 and 7 from this PDF"
  • "How many pages does this PDF have?"

Available Tools

Tool Description Key Parameters
html_to_pdf Convert HTML content to PDF html, format, landscape, scale, margin, watermark, password
url_to_pdf Convert a webpage URL to PDF url, format, landscape, scale, margin, watermark, password
merge_pdfs Merge 2-100 PDFs into one pdfs (array of base64 strings)
split_pdf Extract specific pages from a PDF pdf (base64), pages (e.g. "1-3,5,8-10")
pdf_info Get metadata, page count, and dimensions pdf (base64)

PDF Options (html_to_pdf & url_to_pdf)

Both conversion tools support these optional parameters:

Option Type Description
format A4 | A3 | A5 | Letter | Legal | Tabloid Paper format (default: A4)
landscape boolean Landscape orientation
printBackground boolean Include background graphics
scale number (0.1-2) Scale factor
margin object Page margins in CSS units (top, right, bottom, left)
emulateMediaType screen | print CSS media type emulation
metadata object PDF document metadata (title, author, subject, keywords)
watermark object Diagonal text watermark (text, fontSize, opacity, rotation, color)
outline boolean Auto-generate bookmarks from HTML headings
password object AES-256/RC4 encryption (userPassword, ownerPassword, permissions)

Architecture

┌─────────────────┐     stdio      ┌──────────────────┐     HTTPS     ┌─────────────────┐
│  Claude/Cursor   │◄──────────────►│  pdfspark-mcp    │──────────────►│  pdfspark.dev   │
│  (AI Assistant)  │                │  (MCP Server)    │               │  (PDF API)      │
└─────────────────┘                └──────────────────┘               └─────────────────┘

Configuration

Environment Variable Default Description
PDFSPARK_BASE_URL https://pdfspark.dev API base URL

To use a custom API endpoint:

{
  "mcpServers": {
    "pdfspark": {
      "command": "npx",
      "args": ["-y", "pdfspark-mcp"],
      "env": {
        "PDFSPARK_BASE_URL": "https://your-instance.example.com"
      }
    }
  }
}

SoftVoyagers Ecosystem

PDFSpark is part of the SoftVoyagers free API portfolio:

Product Domain Description
LinkMeta linkmeta.dev URL metadata extraction API
PageShot pageshot.site Screenshot & webpage capture API
PDFSpark pdfspark.dev HTML/URL to PDF conversion API
OGForge ogforge.dev Open Graph image generator API
LinkShrink linkshrink.dev Privacy-first URL shortener API
Faktuj faktuj.pl Polish invoice generator
QRMint qrmint.dev Styled QR code generator API
PageDrop pagedrop.dev Instant HTML hosting API

License

MIT