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

@thiagocolen/kedin-pdf

v2.0.0

Published

Create multi-page PDFs from images, exposed as an MCP server tool for agents like Claude Code.

Readme

kedin-pdf

Create multi-page PDFs from a list of images. Ships as an MCP (Model Context Protocol) server so agents like Claude Code and Claude Desktop can call it as a tool, and as a plain Node.js library you can import directly.

Each image becomes one page, scaled to fit while preserving aspect ratio. Supported page formats (4:5 portrait, sized for image-carousel-style PDFs):

| Format | Description | | --------- | -------------------------- | | 640x800 | 4:5 portrait, larger (default) | | 480x600 | 4:5 portrait, smaller |


Tools exposed over MCP

  • list_pdf_formats — no arguments. Lists the supported page formats.
  • create_pdf — creates the PDF.
    {
      "imagePaths": ["./images/page1.jpg", "./images/page2.png"],
      "outputPath": "./output/carousel.pdf",
      "format": "640x800"
    }
    imagePaths (required): array of image file paths, in page order. outputPath (required): where to write the PDF. format (optional): "640x800" or "480x600", defaults to "640x800".

Use it with Claude Code

Claude Code can register any MCP server with the claude mcp add command.

1. Install and register in one step, running the published package via npx:

claude mcp add kedin-pdf -- npx -y -p @thiagocolen/kedin-pdf kedin-pdf-mcp

By default this registers the server at local scope (only this project). To make it available in every project, add --scope user:

claude mcp add kedin-pdf --scope user -- npx -y -p @thiagocolen/kedin-pdf kedin-pdf-mcp

2. Verify it's registered:

claude mcp list

You should see kedin-pdf listed and connected.

3. Use it. In a Claude Code session, just ask in plain language, e.g.:

Turn these three screenshots into a single PDF, one per page, using the 480x600 format.

Claude Code will discover the create_pdf tool and call it with the right arguments.

4. Remove it later, if needed:

claude mcp remove kedin-pdf

Use it with Claude Desktop

Claude Desktop reads its MCP server list from a config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

1. Open (or create) that file and add an entry under mcpServers:

{
  "mcpServers": {
    "kedin-pdf": {
      "command": "npx",
      "args": ["-y", "-p", "@thiagocolen/kedin-pdf", "kedin-pdf-mcp"]
    }
  }
}

If the file already has other servers configured, just add the "kedin-pdf" key alongside them inside the existing "mcpServers" object.

2. Restart Claude Desktop completely (quit, not just close the window) so it picks up the new config.

3. Confirm it loaded: open a new chat, click the tools/plug icon (or "Search and tools"), and check that kedin-pdf appears with its two tools.

4. Use it by asking Claude, in plain language, to combine a set of local image files into a PDF. Claude Desktop will prompt you to approve the tool call the first time.


Use it with other MCP clients

Any client that can spawn an MCP server over stdio (Cursor, Windsurf, Cline, a custom @modelcontextprotocol/sdk client, etc.) can use the same command:

{
  "command": "npx",
  "args": ["-y", "-p", "@thiagocolen/kedin-pdf", "kedin-pdf-mcp"]
}

Consult your client's documentation for exactly where this config goes — the command and args above are the same everywhere. If your client only accepts a single executable string rather than command/args, install the package globally (npm install -g @thiagocolen/kedin-pdf) and point it at kedin-pdf-mcp directly.


Use it as a plain Node.js library (no MCP)

npm install @thiagocolen/kedin-pdf
import { createPdfFromImages } from "@thiagocolen/kedin-pdf";

const outputPath = await createPdfFromImages(
  ["./images/page1.jpg", "./images/page2.png"],
  "./output/carousel.pdf",
  { format: "480x600" } // optional, defaults to "640x800"
);

console.log("PDF created at", outputPath);

Development

git clone https://github.com/thiagocolen/kedin-pdf.git
cd kedin-pdf
npm install

No build step — it's plain ESM JavaScript, run directly by Node (requires Node.js >= 18.3.0).

Testing locally before publishing

1. Run the MCP server directly and inspect it with the official MCP Inspector:

npx @modelcontextprotocol/inspector node mcp/server.js

This opens a browser UI where you can call list_pdf_formats and create_pdf by hand and see the raw responses.

2. Point Claude Code or Claude Desktop at your local checkout instead of the published package, so you're testing your working copy:

claude mcp add kedin-pdf-dev -- node D:\path\to\kedin-pdf\mcp\server.js

(For Claude Desktop, use "command": "node", "args": ["D:\\path\\to\\kedin-pdf\\mcp\\server.js"].)

3. Exercise the library function directly, without MCP, from a scratch script:

// test.mjs, run from the repo root with `node test.mjs`
import { createPdfFromImages } from "./src/index.js";

await createPdfFromImages(["./img1.png", "./img2.png"], "./out.pdf", {
  format: "640x800",
});

4. Simulate a real npm install @thiagocolen/kedin-pdf in another project without publishing: npm pack produces thiagocolen-kedin-pdf-<version>.tgz in this directory — install that tarball from the other project with npm install ../kedin-pdf/thiagocolen-kedin-pdf-<version>.tgz.


License

MIT