Stability AI MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GCS_PROJECT_IDNoGoogle Cloud Project ID for storing images (when using SSE mode)
GCS_BUCKET_NAMENoGoogle Cloud Storage bucket name for storing images (when using SSE mode)
GCS_PRIVATE_KEYNoGoogle Cloud Service Account private key for storing images (when using SSE mode)
GCS_CLIENT_EMAILNoGoogle Cloud Service Account client email for storing images (when using SSE mode)
STABILITY_AI_API_KEYYesYour Stability AI API key. Get one at platform.stability.ai
IMAGE_STORAGE_DIRECTORYNoDirectory where generated images will be saved/tmp/tadasant-mcp-server-stability-ai (or C:\Windows\Temp\mcp-server-stability-ai on Windows)

Schema

Prompts

Interactive templates invoked by user choice

NameDescription
generate-image-from-textGenerate a new image with configurable description, style, and aspect ratio
generate-image-from-sketchGenerate an image from a hand-drawn sketch
generate-image-in-the-style-ofGenerate an image in the style of an existing image
generate-image-using-structureGenerate an image while maintaining the structure (i.e. background, context) of a reference image
upscale-imageUpscale the quality of an image
edit-imageMake a minor modification to an existing image

Resources

Contextual data attached and managed by the client

NameDescription
.git
.github
.gitignore
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
images
node_modules
package-lock.json
package.json
pnpm-lock.yaml
src
tsconfig.json

Tools

Functions exposed to the LLM to take actions

NameDescription
stability-ai-generate-image

Generate an image of anything based on a provided prompt.

stability-ai-generate-image-sd35

Generate an image using Stable Diffusion 3.5 models with advanced configuration options.

stability-ai-remove-background

Remove the background from an image.

stability-ai-outpaint

Extends an image in any direction while maintaining visual consistency.

stability-ai-search-and-replace

Replace objects or elements in an image by describing what to replace and what to replace it with.

stability-ai-upscale-fast

Cheap and fast tool to enhance image resolution by 4x.

stability-ai-upscale-creative

Enhance image resolution up to 4K using AI with creative interpretation. This tool works best on highly degraded images and performs heavy reimagining. In general, don't use this (expensive) tool unless specifically asked to do so, usually after trying stability-ai-upscale-fast first.

stability-ai-control-sketch

Translate hand-drawn sketches to production-grade images.

stability-ai-0-list-resources

Use this to check for files before deciding you don't have access to a file or image or resource. It pulls in a list of all of user's available Resources (i.e. image files and their URI's) so we can reference pre-existing images to manipulate or upload to Stability AI.

stability-ai-search-and-recolor

Search and recolor object(s) in an image

stability-ai-replace-background-and-relight

Replace background and adjust lighting of an image

stability-ai-control-style

Generate a new image in the style of a reference image

stability-ai-control-structure

Generate a new image while maintaining the structure of a reference image