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 🙏

© 2025 – Pkg Stats / Ryan Hefner

image-mcp

v0.0.13

Published

An MCP server for AI image generation and handling

Readme

Image MCP Server

An MCP (Model Context Protocol) server that provides AI image generation capabilities using the ai-image npm module, which wraps around OpenAI and Replicate image inference APIs.

Features

  • generate_ai_image: Generate AI images with customizable prompts, sizes, models, and styles
  • square_image: Generate square images (1024x1024) - shortcut command
  • landscape_image: Generate landscape images (1536x1024) - shortcut command
  • portrait_image: Generate portrait images (1024x1536) - shortcut command
  • Built on the ai-image module for seamless integration with OpenAI and Replicate APIs
  • Simple setup and configuration

Installation

npm install -g image-mcp

Setup

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "image-mcp": {
      "command": "npx",
      "args": ["image-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "REPLICATE_API_TOKEN": "your-replicate-api-token",
        "MCP_TIMEOUT": "1200000"
      },
      "resetTimeoutOnProgress": true
    }
  }
}

Environment Variables

The server requires API keys for the underlying image generation services:

  • OPENAI_API_KEY: Your OpenAI API key for GPT-based models (we won't be supporting Dall-e models as they'll likely be dropped soon)
  • REPLICATE_API_TOKEN: Your Replicate API token for other AI models

Usage

Once configured, you can use the image generation functions through Claude:

generate_ai_image

Generate AI images with various parameters:

  • prompt (required): Text description of the image to generate
  • size (optional): Image dimensions in WIDTHxHEIGHT format (default: "1024x1024")
  • model (optional): Specific AI model to use
  • output (optional): Custom output file path

Shortcut Commands

For convenience, use these preset size commands:

  • square_image: Generate 1024x1024 square images
  • landscape_image: Generate 1536x1024 landscape images
  • portrait_image: Generate 1024x1536 portrait images

All shortcut commands accept the same parameters as generate_ai_image except size (which is preset).

Example prompts:

  • "A red cat in Picasso style"
  • "A sunset over mountains, photorealistic"
  • "Abstract geometric patterns in blue and gold"

Development

# Clone the repository
git clone https://github.com/iplanwebsites/image-mcp.git
cd image-mcp

# Install dependencies
npm install

# Run in development mode
npm run dev

# Start the server
npm start

Requirements

  • Node.js >= 18.0.0
  • Valid API keys for OpenAI and/or Replicate

TODOs

Urgent

  • [ ] Fix npm module issue: It only works locally...

Improvements

  • [ ] Better guides: Add more detailed setup guides with troubleshooting steps, an Add to cursor button, etc

  • [x] Use ai-image library directly: Replace subprocess CLI calls with direct library imports

  • [ ] Return file paths: Return created image file paths in response

  • [ ] Local inference support: Add support for local models like Flux

  • [ ] Image optimization: Add lightweight image resizing and optimization options

  • [ ] Image captioning tool: Add captioning model for basic use cases (useful for models without vision)

License

MIT