Back to Directory/Developer Tools

io.github.kmalakoff/mcp-pdf

MCP server for PDF generation using PDFKit

Developer ToolsTypeScriptv1.0.3

@mcp-z/mcp-pdf

Create PDF documents and layouts, render pages to PNG, and measure text through MCP. The server runs locally and requires no API key.

Requires Node.js >=22.13. The examples use npx, included with npm, to run this server and @mcp-z/cli.

Transports

MCP supports stdio and HTTP.

Both transports support the 2025 and 2026-07-28 protocol revisions. The 2026 revision is stateless, so clients using it send no initialize handshake or session ID.

Save one of these configurations as .mcp.json in the directory where you will run the commands.

Stdio

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

HTTP

{
  "mcpServers": {
    "pdf": {
      "type": "http",
      "url": "http://localhost:9010/mcp",
      "start": {
        "command": "npx",
        "args": ["-y", "@mcp-z/mcp-pdf", "--port=9010"]
      }
    }
  }
}

start is an extension used by npx @mcp-z/cli up to launch HTTP servers for you. The MCP endpoint is /mcp.

First use

# List tools
npx -y @mcp-z/cli inspect --servers pdf --tools

# Create a simple PDF
npx -y @mcp-z/cli call-tool pdf pdf-document '{"content":[{"type":"text","text":"Hello from MCP"}]}'

The tool returns a file URI and metadata for the generated PDF. See the complete tool reference for parameters and examples.

Tool summary

ToolUse
pdf-documentFlowing documents with automatic pagination
pdf-layoutPrecisely positioned layouts such as slides and flyers
pdf-resumeJSON Resume documents
pdf-imageRender PDF pages to PNG
text-measureMeasure text before layout

External resources

None.

Prompts

  1. resource-fetching

Resources

  • PDFKit Documentation
  • JSON Resume Schema
  • JSON Resume Editor

Documentation

API Docs

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y @mcp-z/mcp-pdf

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-kmalakoff-mcp-pdf": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-pdf"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

@mcp-z/mcp-pdfnpm

Compatible MCP Clients

io.github.kmalakoff/mcp-pdf works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More