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

@pigbun-ai/pigbun-media-generation-mcp

v1.0.0

Published

PigBun Media Generation MCP server for text-to-image and image editing workflows with PigBun auth and pluggable media providers

Readme

@pigbun-ai/pigbun-media-generation-mcp

PigBun Media Generation MCP is a production-ready Model Context Protocol server for image generation workflows. It provides a simple MCP interface for:

  • text_to_image — generate images from prompts
  • image_edit — generate images from prompts plus reference images

Built for PigBun-style authentication and flexible vendor integration, it supports both native Gemini image endpoints and OpenAI-compatible image APIs. The package is bundled for distribution, publishes without source files, and can save generated images directly to local paths.

Highlights

  • PigBun auth gateway verification with cache, signature, and timestamp validation
  • Configurable media provider, base URL, API key, and model
  • Supports both gemini-native and openai-compatible provider modes
  • Optional local file output via outputPath
  • Bundled npm package with dist-only publish output

Quick Start

Install and build:

npm install
npm run build

Run with PigBun auth plus a media vendor key:

PIGBUN_API_KEY=your_pb_live_key \
MEDIA_API_KEY=your_vendor_key \
MEDIA_PROVIDER=gemini-native \
MEDIA_BASE_URL=https://api.midsummer.work \
MEDIA_MODEL=gemini-3.1-flash-image-preview \
node dist/index.js

Claude Desktop example:

{
  "mcpServers": {
    "pigbun-media-generation": {
      "command": "npx",
      "args": ["-y", "@pigbun-ai/pigbun-media-generation-mcp"],
      "env": {
        "PIGBUN_API_KEY": "your_pb_live_key",
        "MEDIA_API_KEY": "your_vendor_key",
        "MEDIA_PROVIDER": "gemini-native",
        "MEDIA_BASE_URL": "https://api.midsummer.work",
        "MEDIA_MODEL": "gemini-3.1-flash-image-preview"
      }
    }
  }
}

Environment variables

  • PIGBUN_API_KEY: required PigBun auth key, used with https://pigbunai.com
  • PIGBUN_GATEWAY_URL: optional auth gateway, defaults to https://pigbunai.com
  • PIGBUN_SIGNATURE_SECRET: optional signature secret for verify response validation
  • MEDIA_API_KEY: required media vendor key; if omitted, code falls back to PIGBUN_API_KEY
  • MEDIA_BASE_URL: optional media API base URL, defaults to https://api.midsummer.work
  • MEDIA_MODEL: optional model override, defaults to gemini-3.1-flash-image-preview
  • MEDIA_PROVIDER: optional provider, supports gemini-native and openai-compatible, default is gemini-native

Run

Gemini-native supplier example:

PIGBUN_API_KEY=your_pb_live_key \
MEDIA_API_KEY=your_vendor_key \
MEDIA_PROVIDER=gemini-native \
MEDIA_BASE_URL=https://api.midsummer.work \
MEDIA_MODEL=gemini-3.1-flash-image-preview \
node dist/index.js

OpenAI-compatible supplier example:

PIGBUN_API_KEY=your_pb_live_key \
MEDIA_API_KEY=your_vendor_key \
MEDIA_PROVIDER=openai-compatible \
MEDIA_BASE_URL=https://your-vendor.example.com \
MEDIA_MODEL=gpt-image-1 \
node dist/index.js

Tool parameters

text_to_image

  • prompt: string, required
  • outputPath: string, optional
  • model: string, optional
  • aspectRatio: optional enum
  • imageSize: optional enum

image_edit

  • prompt: string, required
  • imageInputs: string array, required, supports URLs and local file paths
  • outputPath: string, optional
  • model: string, optional
  • aspectRatio: optional enum
  • imageSize: optional enum