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

@mcpcn/image-ai-generation-mcp

v2.0.7

Published

AI image generation MCP tool powered by the Nano Banana Pro API

Readme

AI Image Generation MCP

An AI image generation MCP tool powered by the Nano Banana Pro API. It creates high-quality images from text prompts.

Features

  • Intelligent image generation from text prompts
  • GPT Image-2 text-to-image task creation
  • Optional platform-side content filtering control
  • Optional callback URL for completed tasks
  • Async task polling through query-task
  • Cloud generation with image URLs returned by the API

Installation

npm install
npm run build

Configuration

Set the KIE_API_KEY environment variable:

export KIE_API_KEY=your_api_key_here

Get an API key at https://kie.ai/api-key.

You can optionally set KIE_MODEL to override the default model:

export KIE_MODEL=gpt-image-2-text-to-image

Usage

Tool 1: generate-image

Creates an image generation task. If the image completes within 2 seconds, the tool returns the image URL directly. Otherwise, it returns a task ID for async polling.

Parameters:

  • prompt (required): Image generation prompt. Describe the desired image in detail, up to 20,000 characters.
  • nsfw_checker (optional): Whether to disable platform-side content filtering. Defaults to false.
  • callBackUrl (optional): Callback URL invoked after the task completes.

Example:

{
  "prompt": "A cute orange cat sitting on a windowsill, looking out at a snowy landscape",
  "nsfw_checker": false
}

Example with callback URL:

{
  "prompt": "A watercolor-style mountain cabin at sunrise, soft light, detailed brush texture",
  "nsfw_checker": false,
  "callBackUrl": "https://example.com/callback"
}

Synchronous success response:

{
  "status": "success",
  "message": "Image generation completed.",
  "prompt": "A cute orange cat sitting on a windowsill, looking out at a snowy landscape",
  "nsfw_checker": false,
  "imageUrl": "https://static.aiquickdraw.com/tools/example/image.png"
}

Async response:

{
  "status": "async",
  "message": "Image generation is taking longer than expected and has switched to async mode.",
  "taskId": "281e5b0*********************f39b9",
  "prompt": "A cute orange cat sitting on a windowsill, looking out at a snowy landscape",
  "nsfw_checker": false,
  "tip": "Use the query-task tool to check task progress and results."
}

Tool 2: query-task

Queries the status and progress of an image generation task.

Parameters:

  • taskId (required): Task ID returned by generate-image.

Example:

{
  "taskId": "281e5b0*********************f39b9"
}

Response format:

{
  "taskId": "281e5b0*********************f39b9",
  "state": "success",
  "model": "gpt-image-2-text-to-image",
  "elapsedSeconds": 45,
  "imageUrl": "https://static.aiquickdraw.com/tools/example/1763662100739_DlBXJvdR.png",
  "failCode": null,
  "failMsg": null,
  "createdAt": "2026-01-22T03:00:00.000Z",
  "completedAt": "2026-01-22T03:00:45.000Z"
}

State values:

  • waiting: The task is queued or still processing.
  • success: The task completed successfully. Retrieve the image from imageUrl.
  • fail: The task failed. Check failMsg for details.

Prompt Tips

For better results:

  1. Describe the subject, environment, lighting, colors, and other details.
  2. Specify the desired artistic style or visual reference.
  3. Describe composition details such as camera angle, depth of field, and focal point.
  4. Include the mood or atmosphere you want the image to convey.

Good prompt examples:

  • "A girl in a red dress dancing under cherry blossom trees, soft sunlight filtering through the petals, dreamy pink tones, cinematic composition"
  • "A cyberpunk Tokyo street after rain, neon signs glowing, wet pavement reflecting colorful light, wide-angle lens"
  • "An oil painting of a mountain cabin in autumn, golden leaves, warm fireplace light through the window, peaceful atmosphere"

API Notes

This tool uses the Nano Banana Pro API. See https://kie.ai/api-key for details.

Development

# Development mode
npm run dev

# Build
npm run build

# Clean
npm run clean

License

MIT