🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

pdfspark-mcp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfspark-mcp

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

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

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

ToolDescriptionKey Parameters
html_to_pdfConvert HTML content to PDFhtml, format, landscape, scale, margin, watermark, password
url_to_pdfConvert a webpage URL to PDFurl, format, landscape, scale, margin, watermark, password
merge_pdfsMerge 2-100 PDFs into onepdfs (array of base64 strings)
split_pdfExtract specific pages from a PDFpdf (base64), pages (e.g. "1-3,5,8-10")
pdf_infoGet metadata, page count, and dimensionspdf (base64)

PDF Options (html_to_pdf & url_to_pdf)

Both conversion tools support these optional parameters:

OptionTypeDescription
formatA4 | A3 | A5 | Letter | Legal | TabloidPaper format (default: A4)
landscapebooleanLandscape orientation
printBackgroundbooleanInclude background graphics
scalenumber (0.1-2)Scale factor
marginobjectPage margins in CSS units (top, right, bottom, left)
emulateMediaTypescreen | printCSS media type emulation
metadataobjectPDF document metadata (title, author, subject, keywords)
watermarkobjectDiagonal text watermark (text, fontSize, opacity, rotation, color)
outlinebooleanAuto-generate bookmarks from HTML headings
passwordobjectAES-256/RC4 encryption (userPassword, ownerPassword, permissions)

Architecture

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

Configuration

Environment VariableDefaultDescription
PDFSPARK_BASE_URLhttps://pdfspark.devAPI 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:

ProductDomainDescription
LinkMetalinkmeta.devURL metadata extraction API
PageShotpageshot.siteScreenshot & webpage capture API
PDFSparkpdfspark.devHTML/URL to PDF conversion API
OGForgeogforge.devOpen Graph image generator API
LinkShrinklinkshrink.devPrivacy-first URL shortener API
Faktujfaktuj.plPolish invoice generator
QRMintqrmint.devStyled QR code generator API
PageDroppagedrop.devInstant HTML hosting API

License

MIT

Keywords

mcp

FAQs

Package last updated on 31 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts