npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-pdfkit

v1.0.2

Published

Lightweight MCP server for PDF generation using pdfkit

Readme

mcp-pdfkit

A lightweight MCP server for generating PDFs using PDFKit. One file, simple schemas, no bloat.

Usage

With Claude Desktop

Add to your Claude Desktop config:

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

With Zed

Add to your Zed settings (⌘ + ,):

{
  "context_servers": {
    "mcp-pdfkit": {
      "command": "npx",
      "args": ["-y", "mcp-pdfkit"]
    }
  }
}

Tool: pdf-document

Creates a flowing PDF document with automatic pagination. Returns a file:// URI to the generated PDF.

Parameters

| Parameter | Type | Default | Description | | ---------- | -------- | ---------- | ------------------------------------ | | filename | string | document.pdf | Output filename | | title | string | — | Document title metadata | | author | string | — | Document author metadata | | pageSize | string | LETTER | Page size: LETTER, A4, LEGAL | | margins | object | 72pt all | { top, bottom, left, right } in points | | content | array | (required) | Array of content items |

Content types

text — Body text with optional formatting.

{
  "type": "text",
  "text": "Hello, world!",
  "fontSize": 12,
  "font": "Helvetica",
  "color": "#333333",
  "align": "center",
  "lineGap": 2
}

heading — Section heading (bold, larger font by default).

{
  "type": "heading",
  "text": "My Document",
  "fontSize": 24,
  "font": "Helvetica-Bold",
  "color": "#000000",
  "align": "center"
}

spacer — Vertical whitespace.

{ "type": "spacer", "height": 40 }

divider — Horizontal rule.

{ "type": "divider", "color": "#cccccc", "thickness": 1 }

pageBreak — Force a new page.

{ "type": "pageBreak" }

image — Inline image from an absolute file path.

{
  "type": "image",
  "path": "/absolute/path/to/image.png",
  "width": 200,
  "height": 150,
  "align": "center"
}

Available fonts

PDFKit built-in fonts only (no emoji/unicode support):

  • Helvetica, Helvetica-Bold, Helvetica-Oblique
  • Times-Roman, Times-Bold, Times-Italic
  • Courier, Courier-Bold, Courier-Oblique

Example

Ask your AI assistant:

Generate me a PDF with a dad joke

And it will call the pdf-document tool with something like:

{
  "filename": "dad-joke.pdf",
  "title": "Dad Joke of the Day",
  "content": [
    { "type": "heading", "text": "Dad Joke of the Day", "align": "center" },
    { "type": "divider", "color": "#3366cc", "thickness": 2 },
    { "type": "spacer", "height": 30 },
    { "type": "text", "text": "Why do programmers always confuse Halloween and Christmas?", "align": "center", "font": "Helvetica-Bold", "fontSize": 18 },
    { "type": "spacer", "height": 15 },
    { "type": "text", "text": "Because Oct 31 = Dec 25.", "align": "center", "fontSize": 18 },
    { "type": "spacer", "height": 40 },
    { "type": "divider" },
    { "type": "text", "text": "(Octal 31 equals Decimal 25)", "align": "center", "color": "#888888", "font": "Helvetica-Oblique", "fontSize": 11 }
  ]
}

How it works

  • fastmcp handles the MCP protocol (stdio transport)
  • pdfkit generates the PDF
  • PDFs are written to a temp directory and a file:// URI is returned
  • Schemas are flat and simple — no recursive types, no $ref — compatible with all model providers including Amazon Bedrock

License

MIT