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

mcp-stability-ai

v1.0.0

Published

MCP server for Stability.ai v2beta image generation and editing — use directly in Claude Desktop

Readme

mcp-stability-ai

npm version CI License: MIT

A Claude MCP server for Stability.ai image generation and editing — always maintained and up to date with the v2beta API.

Generate, edit, upscale, and manage images entirely through natural language inside Claude. No manual file paths required.


Tools

Generation

| Tool | Description | Cost | |---|---|---| | generate_image_sd3 | SD3.5 — best overall quality, supports negative prompts | ~$0.035–$0.065 | | generate_image_core | Core — fast generation with style presets | ~$0.03 | | generate_image_ultra | Ultra — highest photorealistic quality | ~$0.08 |

Editing

| Tool | Description | Cost | |---|---|---| | remove_background | Remove background, returns transparent PNG | $0.02 | | replace_background | Replace + relight background — great for product shots | ~$0.04 | | inpaint | Edit a masked region using a prompt | ~$0.03 | | search_and_replace | Find an object by description and replace it, no mask needed | $0.04 | | search_and_recolor | Recolor a specific object by description, no mask needed | ~$0.04 | | outpaint | Extend the canvas in any direction | $0.04 |

Upscaling

| Tool | Description | Cost | |---|---|---| | upscale_fast | 4x upscale, preserves original appearance | $0.01 | | upscale_creative | 4x upscale with AI artistic enhancement | ~$0.25 |

File management (no API cost)

| Tool | Description | |---|---| | list_images | List images in output/input directories with thumbnails | | use_clipboard_image | Save clipboard image to file for use in the next tool (macOS) | | reveal_in_finder | Open the output folder or reveal a file in Finder (macOS) | | delete_image | Permanently delete an image file |


Installation

1. Get a Stability API key

Sign up at platform.stability.ai and copy your API key.

2. Add the server to Claude Desktop

Open the Claude Desktop config file and add the stability block inside mcpServers:

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

{
  "mcpServers": {
    "stability": {
      "command": "npx",
      "args": ["-y", "mcp-stability-ai"],
      "env": {
        "STABILITY_API_KEY": "sk-YOUR_KEY_HERE"
      }
    }
  }
}

3. Restart Claude Desktop

The Stability AI tools will appear automatically.


Usage examples

Generate an image

"Generate a cinematic photo of a red panda on a mossy log in a rainy forest, 16:9"

Product photo pipeline (remove → replace → upscale)

"Take the photo at /Users/me/dragon.jpg, remove the background, place it on a dark dramatic studio background with top lighting, then upscale 4x."

Claude chains the tools automatically:

  1. remove_background → isolates subject, saves PNG
  2. replace_background → dark studio background + relighting
  3. upscale_fast → 4x resolution boost

Use the clipboard instead of a file path

"Use the image I just copied, remove the background, then replace it with a blurred workshop background."

  1. Copy an image to clipboard (⌘C in any app)
  2. Claude calls use_clipboard_image → saves to file
  3. remove_backgroundreplace_background automatically

Work with short filenames

After the first tool runs, Claude knows the output filename. You can reference files naturally:

"Now upscale the remove_background result" or "List my images and upscale the latest one"

list_images shows all available files — Claude can pick the right one without you typing a path.

Recolor an object

"In /Users/me/device.jpg, recolor the plastic housing to matte black."

Extend a portrait to widescreen

"Outpaint /Users/me/portrait.jpg by 600px left and 600px right, prompt: continuation of the blurred background."


Output files

Results are saved to ~/Downloads/stability-ai/ by default (created automatically).

Filename format: {tool}_{YYYY-MM-DD}_{HH-MM-SS}_{seed}.{ext}
Example: replace-background_2026-06-09_11-36-20_2847291838.png

Environment variables

| Variable | Default | Description | |---|---|---| | STABILITY_API_KEY | (required) | Your Stability AI API key | | STABILITY_OUTPUT_DIR | ~/Downloads/stability-ai | Where generated images are saved | | STABILITY_INPUT_DIR | (unset) | Folder Claude searches for input images by short name |

Configure in Claude Desktop:

"env": {
  "STABILITY_API_KEY": "sk-...",
  "STABILITY_OUTPUT_DIR": "/Users/you/Pictures/stability",
  "STABILITY_INPUT_DIR": "/Users/you/Pictures/input"
}

With STABILITY_INPUT_DIR set, you can pass bare filenames like "dragon.jpg" instead of full paths — Claude resolves them automatically.


Development

git clone https://github.com/alesurli/mcp-stability-ai.git
cd mcp-stability-ai
npm install
npm run build

Point Claude Desktop at your local build:

{
  "mcpServers": {
    "stability": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-stability-ai/dist/index.js"],
      "env": {
        "STABILITY_API_KEY": "sk-YOUR_KEY_HERE"
      }
    }
  }
}

Requires Node.js 22+.


Contributing

See CONTRIBUTING.md.


License

MIT