Connector guide9-minute read23 MCP tools7 languages

How to Connect Stability AI to Claude via MCP

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

HCBy HelpCode teamUpdated 9 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Stability AI

Stability AI

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, control generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; also reads the credit balance. Paid per generation in credits.

tools

23

Region

INTL

Category

Public Data

Authentication

Bearer Token

Required env vars

STABILITY_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Stability AI in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

AnythingMCP is listed in Claude's connector directory: add it to Claude in one click (opens in a new tab), then sign in and choose which MCP servers Claude may use.

Summary

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Try asking

Example prompts for Stability AI

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Stability AI · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Stability AI, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Stability AI + Claude

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

STABILITY_API_KEY

Step 1 — Get credentials

Setting up takes about 3 minutes. You need a Stability AI account with credits; new accounts get 25 free credits.

  1. Create an account at https://platform.stability.ai and buy credits under Billing if needed.
  2. Open API keys (https://platform.stability.ai/dashboard/api-keys), copy a key (it starts with sk-) and paste it into STABILITY_API_KEY. It is sent as Authorization: Bearer.
  3. Install the connector and run stability_ai_get_balance: it shows the credit balance and confirms the key. The key acts for the default organization of its user, and credits are taken from that organization.

Costs: 1 credit = $0.01, and failed generations are free. Every generation, edit, upscale and audio tool costs credits:

  • Create from text: stability_ai_generate_image_core 3, stability_ai_generate_image_ultra 8, stability_ai_generate_image_sd3 6.5 (sd3.5-large), 4 (sd3.5-large-turbo, the default here), 3.5 (sd3.5-medium) or 2.5 (sd3.5-flash).
  • Upscale: stability_ai_upscale_fast 2, stability_ai_upscale_conservative 40, stability_ai_upscale_creative 60.
  • Edit: stability_ai_erase, stability_ai_inpaint, stability_ai_search_and_replace, stability_ai_search_and_recolor and stability_ai_remove_background 5 each, stability_ai_outpaint 4, stability_ai_replace_background_and_relight 8.
  • Guide with a picture: stability_ai_control_sketch, stability_ai_control_structure and stability_ai_control_style 5 each, stability_ai_control_style_transfer 8.
  • Audio: stability_ai_generate_audio 8.

Free: stability_ai_get_balance, stability_ai_get_account, stability_ai_list_engines, stability_ai_get_result and stability_ai_get_audio_result. Before every paid call the AI tells you the cost and waits for your yes; when in doubt it checks the balance first.

What it creates and edits:

  • Pictures from text: Core is fast and the cheapest default; Ultra gives the best quality and photorealism (about 1 megapixel) and can also start from a picture with strength; Stable Diffusion 3.5 offers Large, Large Turbo, Medium and Flash, also image to image with mode, image_url and strength. Aspect ratios go from 21:9 to 9:21.
  • Higher resolution: the fast upscaler enlarges 4 times without reinterpreting the picture, the conservative one goes to about 4 megapixels and stays faithful, the creative one goes up to 4K and adds detail guided by a prompt.
  • Edits: remove the background (transparent PNG or WebP), erase objects or blemishes with a mask, repaint a masked area (inpaint), extend the canvas in any direction (outpaint), find an object by words and replace or recolour it without a mask, and put a subject on a new background with matching light.
  • Guided generation: turn a sketch into a finished picture, keep the structure of an input picture, copy the style of a reference, or transfer the style of one picture onto another.
  • Music and sound effects with Stable Audio 3, from 1 to 380 seconds, as MP3 or WAV.
  • The account: credit balance, the user with its organizations, and the legacy v1 engines (SDXL and older; the current services are not listed there).

Input pictures: every *_url parameter is a public https link to a JPEG, PNG or WebP file of up to 10 MB. AnythingMCP downloads it and uploads it to Stability AI as a file, so a picture you only pasted into the chat has to be put online first. In a mask, white marks the area to change; without a mask the transparent areas of the picture are used.

Asynchronous jobs: stability_ai_upscale_creative, stability_ai_replace_background_and_relight and stability_ai_generate_audio return a 64-character id at once. The AI calls stability_ai_get_result (pictures) or stability_ai_get_audio_result (audio) with it after about 10 seconds, and again while status is in-progress. Results stay available for 24 hours and only for the same key.

Data formats: finished pictures are attached to the tool result as images you can see, audio as a file. Picture tools also return finish_reason and seed; the same seed with the same prompt reproduces a picture. Pictures default to JPEG to stay small; ask for png or webp when you need transparency. Prompts work best in English and describe subject, setting, style, colours and lighting; what to avoid goes into negative_prompt, and style_preset (photographic, cinematic, anime, digital-art, 3d-model, ...) nudges the look.

Paging: there is nothing to page through. Each call returns one picture, one audio job or one account record.

Switched off at install: no tool. Every tool is enabled; the paid ones are guarded by the cost confirmation.

Limits: 150 requests in 10 seconds; above that, requests are blocked for 60 seconds. Prompts can be up to 10,000 characters.

Common errors: 400 lists the wrong parameters in errors. 401 means a bad key. 402 means not enough credits. 403 means the prompt or picture was flagged by content moderation. 413 means the upload is too large. 422 means the input cannot be processed, for example a picture size out of range or an unsupported language. 429 is the rate limit. finish_reason CONTENT_FILTERED means the output broke the content policy and was blurred: rephrase the prompt. Every error carries an id to quote to Stability support.

The connector does not generate 3D models (Stable Fast 3D, SPAR3D), does not do audio to audio or audio inpainting, and does not use the Stable Audio 2 endpoints or the legacy v1 SDXL generation.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Claude

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Recommended path: works on claude.ai web without editing any config file.

  1. In Claude, open Customize → Connectors.
  2. Click +, then Add custom connector.
  3. Enter a name, e.g. Stability AI, and the remote MCP server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID, then click Add.
  4. Click Connect and sign in to AnythingMCP (OAuth) to allow access.

All tools below appear in your chat: start typing prompts.

Available tools

ToolWhat it does
stability_ai_get_balanceCredit balance of the Stability AI account or organization of the API key (1 credit = $0.01)
stability_ai_get_accountThe Stability AI user of the API key: id, email and the organizations it belongs to (id, name, role, default)
stability_ai_list_enginesList the legacy v1 engines (SDXL and older models) available to the account, with id, name, type and description
stability_ai_get_resultFetch the result of an asynchronous image job (stability_ai_upscale_creative, stability_ai_replace_background_and_relight) by its id
stability_ai_get_audio_resultFetch the result of a stability_ai_generate_audio job by its id
stability_ai_generate_image_coreCreate a picture from a text description with Stable Image Core, the fast and cheap model, and return it as an image the user can see
stability_ai_generate_image_ultraCreate a high-quality, photorealistic or detailed picture with Stable Image Ultra (the best model, about 1 megapixel), optionally starting…
stability_ai_generate_image_sd3Create a picture with Stable Diffusion 3.5 (Large, Large Turbo, Medium or Flash), from text or from a starting picture, and return it as an…
stability_ai_upscale_fastEnlarge a picture 4 times with the fast upscaler (sharper detail, no reinterpretation) and return it as an image
stability_ai_upscale_conservativeUpscale a picture to about 4 megapixels while keeping it faithful to the original (prompt describes the picture), and return it as an image
stability_ai_upscale_creativeUpscale a low-resolution or poor picture to 4K with added detail guided by a prompt
stability_ai_remove_backgroundRemove the background of a picture, keeping the subject on a transparent background, and return it as an image
stability_ai_eraseErase unwanted objects or blemishes from a picture using a mask, filling the area naturally, and return it as an image
stability_ai_inpaintRepaint the masked part of a picture following a prompt (inpainting) and return it as an image
stability_ai_outpaintExtend a picture beyond its borders (outpainting) in any direction and return it as an image
stability_ai_search_and_replaceFind an object in a picture by description and replace it with something else, no mask needed, and return the picture as an image
stability_ai_search_and_recolorFind an object in a picture by description and change its colour, no mask needed, and return the picture as an image
stability_ai_replace_background_and_relightPut the subject of a picture on a new background and relight it to match (product shots, portraits)
stability_ai_control_sketchTurn a sketch or line drawing into a finished picture that follows its outlines, guided by a prompt, and return it as an image
stability_ai_control_structureCreate a new picture that keeps the structure and composition of an input picture, guided by a prompt, and return it as an image
stability_ai_control_styleCreate a new picture from a prompt in the visual style of a reference picture and return it as an image
stability_ai_control_style_transferApply the style of one picture to the content of another (style transfer) and return the result as an image
stability_ai_generate_audioCreate music or sound effects from a text description with Stable Audio 3 (up to about 6 minutes)

Example prompts

  • "How many Stability AI credits are left on the account?"
  • "Create a photorealistic picture of a lighthouse on a rocky coast at sunset in 16:9 with Stable Image Ultra. Tell me the cost first."
  • "Remove the background from https://example.com/product.jpg and give me a transparent PNG."
  • "In https://example.com/street.jpg, replace the red car with a blue bicycle."
  • "Make a 30-second calm lo-fi piano track at 80 BPM for a podcast intro."

FAQ

Does it work with Claude Code as well as Claude Desktop? Yes, point both at https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID.

Next steps

Was this guide helpful?

Your Stability AI agent is one click away.

Install the connector, paste the key, prompt Claude. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Stability AI to ChatGPT via MCP

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Connectors

How to Connect Stability AI to Cursor via MCP

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Connectors

How to Connect Stability AI to Gemini via MCP

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Connectors

How to Connect Stability AI to Meta Muse via MCP

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Connectors

Stability AI to MCP: Image Generation, Editing, Upscaling and Stable Audio in any AI Agent

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.

Connectors

How to Connect Stability AI to Microsoft Copilot via MCP

Create and edit pictures with Stability AI: generate images with Stable Image Ultra, Core and Stable Diffusion 3.5, upscale, remove or replace backgrounds, erase, inpaint, outpaint, search and replace objects, guide generation with sketches, structure and style references, and create music with Stable Audio 3. Pictures come back as images; it also reads the credit balance. Paid per generation in credits.