# mcp-server-stability-ai

> MCP Server

This repository hosts an MCP server that integrates MCP clients with Stability AI's Stable Diffusion for image generation, editing, and upscaling, requiring a Stability AI API key. This repository hosts

## Overview

- **Category:** AI
- **Language:** TypeScript
- **Stars:** 84
- **Forks:** 13
- **Owner:** tadasant
- **GitHub:** https://github.com/tadasant/mcp-server-stability-ai
- **Created:** 2024-12-30T19:02:27+00:00
- **Updated:** 2025-03-27T17:59:51+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-stability-ai-image-manipulation

## Setup

## Setup

You're going to need Node working on your machine so you can run `npx` commands in your terminal; if you don't have Node, you can install it from [nodejs.org](https://nodejs.org/en/download).

**Claude Desktop Manual Setup:**

1.  macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
2.  Windows: `%APPDATA%\Claude\claude_desktop_config.json`
3.  Modify your `claude_desktop_config.json` file to add the following:

```
{
  "mcpServers": {
    "stability-ai": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-stability-ai"
      ],
      "env": {
        "STABILITY_AI_API_KEY": "sk-1234567890"
      }
    }
  }
}
```

4.  Restart Claude Desktop and you should be ready to go.

**Claude Desktop Installation via Smithery:**

```bash
npx @smithery/cli install mcp-server-stability-ai --client claude
```

**SSE Mode:**

1.  Run the server with: `npx mcp-server-stability-ai -y --sse`
2.  Set the `GCS_PROJECT_ID`, `GCS_CLIENT_EMAIL`, `GCS_BUCKET_NAME`, and `GCS_PRIVATE_KEY` environment variables.

## Tools

## Available Tools

1.  `generate-image` (Generate a high quality image based on a provided prompt & other optional parameters.)
2.  `generate-image-sd35` (Generate an image using Stable Diffusion 3.5 models with advanced configuration options.)
3.  `remove-background` (Remove the background from an image.)
4.  `outpaint` (Extend an image in any direction while maintaining visual consistency.)
5.  `search-and-replace` (Replace objects or elements in an image by describing what to replace and what to replace it with.)
6.  `upscale-fast` (Enhance image resolution by 4x.)
7.  `upscale-creative` (Enhance image resolution up to 4K.)
8.  `control-sketch` (Translate hand-drawn sketch to production-grade image.)
9.  `control-style` (Generate an image in the style of a reference image.)
10. `control-structure` (Generate an image while maintaining the structure of a reference image.)
11. `replace-background-and-relight` (Replace the background of an image and relight it.)
12. `search-and-recolor` (Search for and recolor objects in an image.)
