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

mcpimg

v1.0.2

Published

MCP server for AI image generation via OpenRouter, Together AI, Replicate, and fal.ai

Readme

Providers supported (image models only):

  • OpenRouter (default) — Gemini Flash Image, FLUX 2, Sourceful Riverflow, GPT-5 Image
  • Together AI — FLUX.1 Schnell/Dev/Pro, Stable Diffusion XL
  • Replicate — FLUX Schnell, FLUX 1.1 Pro, SDXL, Ideogram
  • fal.ai — FLUX Dev/Schnell/2 Pro, Recraft V3

Quick Start

No install needed — just use npx:

OPENROUTER_API_KEY="sk-or-v1-..." npx -y mcpimg

Tools

generate_image

Generate an image from a text prompt.

| Parameter | Type | Description | |-----------|------|-------------| | prompt | string (required) | Text description of the image | | model | string | Model ID (e.g. google/gemini-2.5-flash-image) | | provider | string | openrouter (default), together, replicate, fal | | aspect_ratio | string | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 | | image_size | string | 1K (default), 2K, 4K | | negative_prompt | string | What to exclude (not all providers support this) | | seed | number | Random seed for reproducibility | | save_to | string | Custom file path to save the image |

list_providers

List all configured providers and their available image models.

| Parameter | Type | Description | |-----------|------|-------------| | provider | string | Filter by provider name |


Setup for AI Agents / IDEs

Claude Code

claude mcp add --scope user --transport stdio image-gen \
  --env OPENROUTER_API_KEY=sk-or-v1-xxx \
  -- npx -y mcpimg

Or create .mcp.json in your project root:

{
  "mcpServers": {
    "image-gen": {
      "command": "npx",
      "args": ["-y", "mcpimg"],
      "env": {
        "OPENROUTER_API_KEY": "sk-or-v1-..."
      }
    }
  }
}

Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "image-gen": {
      "command": "npx",
      "args": ["-y", "mcpimg"],
      "env": {
        "OPENROUTER_API_KEY": "sk-or-v1-..."
      }
    }
  }
}

Claude Desktop

Edit the config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "image-gen": {
      "command": "npx",
      "args": ["-y", "mcpimg"],
      "env": {
        "OPENROUTER_API_KEY": "sk-or-v1-..."
      }
    }
  }
}

OpenCode (by SST)

Edit ~/.config/opencode/opencode.json or opencode.json in project root:

{
  "mcp": {
    "image-gen": {
      "type": "local",
      "command": ["npx", "-y", "mcpimg"],
      "environment": {
        "OPENROUTER_API_KEY": "sk-or-v1-..."
      },
      "enabled": true,
      "timeout": 120000
    }
  }
}

Charm Crush

Add to crush.json in your project root:

{
  "mcp": {
    "image-gen": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcpimg"],
      "env": {
        "OPENROUTER_API_KEY": "sk-or-v1-..."
      }
    }
  }
}

Charm Mods

Edit mods.yml (mods --settings):

mcp-servers:
  image-gen:
    command: [npx]
    args:
      - -y
      - mcpimg
    env:
      - OPENROUTER_API_KEY=sk-or-v1-...

Any MCP-compatible agent

This server uses stdio transport (JSON-RPC over stdin/stdout). Any agent that supports MCP stdio can use it:

npx -y mcpimg

# Required environment variables (at least one)
OPENROUTER_API_KEY=...    # OpenRouter (default)
TOGETHER_API_KEY=...      # Together AI
REPLICATE_API_TOKEN=...   # Replicate
FAL_KEY=...               # fal.ai

Using Multiple Providers

Set multiple API keys to use different providers:

export OPENROUTER_API_KEY="sk-or-v1-..."
export TOGETHER_API_KEY="..."
export FAL_KEY="..."

Then specify the provider when generating:

generate_image(prompt="a cat", provider="together", model="black-forest-labs/FLUX.1-schnell")

Environment Variables

| Variable | Provider | Required | |----------|----------|----------| | OPENROUTER_API_KEY | OpenRouter | At least one | | TOGETHER_API_KEY | Together AI | provider key | | REPLICATE_API_TOKEN | Replicate | is required | | FAL_KEY | fal.ai | | | IMAGE_OUTPUT_DIR | — | Optional. Default: ~/generated-images/ |

License

MIT