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

@glyphpdf/mcp-server

v0.3.0

Published

MCP server for AI-native PDF generation with Glyph

Readme

@glyph-pdf/mcp-server

AI-native PDF generation for Claude Code, Cursor, Windsurf, and other AI coding tools.

Generate and customize professional PDFs using natural language. Describe what you want, and let AI handle the implementation.

Features

  • Natural Language PDF Customization - "Add a QR code for payment", "Make the header more prominent"
  • Smart Template Detection - Auto-detects the best template from your data structure
  • AI Suggestions - Get recommendations for improving your documents
  • Session-Based Workflow - Create a preview, make modifications, generate final PDF

Installation

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "glyph": {
      "command": "npx",
      "args": ["@glyph-pdf/mcp-server"],
      "env": {
        "GLYPH_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "glyph": {
      "command": "npx",
      "args": ["@glyph-pdf/mcp-server"],
      "env": {
        "GLYPH_API_KEY": "your-api-key"
      }
    }
  }
}

Windsurf

Add to your MCP configuration:

{
  "mcpServers": {
    "glyph": {
      "command": "npx",
      "args": ["@glyph-pdf/mcp-server"],
      "env": {
        "GLYPH_API_KEY": "your-api-key"
      }
    }
  }
}

Getting an API Key

  1. Visit glyph.you
  2. Sign up or log in
  3. Navigate to Settings > API Keys
  4. Create a new API key

Available Tools

glyph_preview

Create a PDF preview session with your data.

// Example usage
glyph_preview({
  template: "auto", // or "quote-modern", "invoice", etc.
  data: {
    client: { name: "John Doe", email: "[email protected]" },
    lineItems: [
      { description: "Website Design", quantity: 1, unitPrice: 3500, total: 3500 }
    ],
    totals: { subtotal: 3500, total: 3500 },
    meta: { quoteNumber: "Q-001", date: "January 15, 2024" },
    branding: { companyName: "Your Company" }
  }
})
// Returns: { sessionId: "xxx", html: "..." }

glyph_modify

Modify a document using natural language.

// Examples
glyph_modify({
  sessionId: "xxx",
  instruction: "Add a QR code for payment in the footer"
})

glyph_modify({
  sessionId: "xxx",
  instruction: "Make the header more prominent with a blue gradient"
})

glyph_modify({
  sessionId: "xxx",
  instruction: "Add a watermark that says DRAFT"
})

glyph_generate

Generate the final PDF file.

glyph_generate({
  sessionId: "xxx",
  format: "pdf", // or "png"
  outputPath: "./invoice.pdf" // optional - saves to file
})

glyph_templates

List available document templates.

glyph_templates()
// Returns: { templates: [...], styles: [...] }

glyph_schema

Get the data schema for a template.

glyph_schema({ template: "quote-modern" })
// Returns: { fields: [...], required: [...], example: {...} }

glyph_suggest

Get AI-powered suggestions for improving your document.

glyph_suggest({ sessionId: "xxx" })
// Returns: { suggestions: [...] }

Resources

The MCP server exposes these resources:

  • glyph://templates - List of available templates
  • glyph://schema/{templateId} - Schema for a specific template
  • glyph://session/{sessionId}/preview - Current HTML preview
  • glyph://session/{sessionId}/data - Original data
  • glyph://session/{sessionId}/info - Session metadata

Example Workflow

User: Create a quote for John Doe for website design services, $3500

AI: [Uses glyph_preview to create the document]
    Created preview with session ID xxx

User: Add a QR code for payment and make it look more professional

AI: [Uses glyph_modify with "Add a QR code for payment in the footer"]
    [Uses glyph_modify with "Make the design more professional with subtle shadows"]
    Applied modifications successfully

User: Generate the PDF

AI: [Uses glyph_generate to create final PDF]
    PDF saved to ./quote-john-doe.pdf (45.2 KB)

Typical Use Cases

Invoices & Quotes

  • Generate invoices from order data
  • Create quotes with line items and totals
  • Add company branding and terms

Contracts & Agreements

  • Generate contracts from templates
  • Add signature lines
  • Include terms and conditions

Reports & Summaries

  • Create data reports
  • Generate executive summaries
  • Build dashboards as PDFs

Environment Variables

| Variable | Description | Required | |----------|-------------|----------| | GLYPH_API_KEY | Your Glyph API key | Yes (or pass in each tool call) |

Development

# Clone the repository
git clone https://github.com/glyph-pdf/mcp-server

# Install dependencies
npm install

# Build
npm run build

# Run locally
GLYPH_API_KEY=your-key node dist/index.js

API Reference

This MCP server communicates with the Glyph API at https://api.glyph.you.

Full API documentation: docs.glyph.you

Support

License

Business Source License 1.1 (BSL-1.1) - See LICENSE for details.