
boxi-rgb/sd-webui-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Stable Diffusion WebUI MCP integration - Connect Claude Desktop with local Stable Diffusion WebUI
개요
An MCP (Model Context Protocol) server that connects Claude Desktop to your local Stable Diffusion WebUI installation, enabling AI-assisted image generation directly from your conversations. This project allows you to utilize your local Stable Diffusion installation through Claude Desktop, giving you the ability to: * Generate images from text descriptions * Edit existing images with text prompts * List and switch between different Stable Diffusion models * Access advanced image generation parameters * View image thumbnails directly in Claude responses All while staying within the Claude Desktop interface, without switching between applications.
README
원문 README의 일부입니다. 원문 보기.
SD WebUI MCP Server
An MCP (Model Context Protocol) server that connects Claude Desktop to your local Stable Diffusion WebUI installation, enabling AI-assisted image generation directly from your conversations.
🔋 Overview
This project allows you to utilize your local Stable Diffusion installation through Claude Desktop, giving you the ability to:
- Generate images from text descriptions
- Edit existing images with text prompts
- List and switch between different Stable Diffusion models
- Access advanced image generation parameters
- View image thumbnails directly in Claude responses
All while staying within the Claude Desktop interface, without switching between applications.
🎯 Features
- Text-to-Image Generation: Create images from text prompts
- Image-to-Image Editing: Modify existing images using text guidance
- Model Management: List and switch between your installed models
- Sampler Control: Access all WebUI samplers
- Connection Status: Verify connectivity with your local Stable Diffusion
- High Performance: Uses your local GPU resources for image generation
- Privacy-Focused: All processing happens on your machine
- Base64 Thumbnails: See images directly in Claude responses
- SDXL Optimized: Default settings tuned for SDXL’s 1024x1024 resolution
📦 Prerequisites
- Node.js v16.0.0 or higher
- Stable Diffusion WebUI with API enabled
- Claude Desktop
- Basic familiarity with command line interfaces
🚀 Installation
1. Clone this repository
git clone https://github.com/boxi-rgb/sd-webui-mcp.git
cd sd-webui-mcp
2. Install dependencies
npm install
3. Build the project
npm run build
4. Configure Stable Diffusion WebUI
Make sure your Stable Diffusion WebUI is running with the API enabled.
For Windows:
Edit your webui-user.bat file and add --api to the COMMANDLINE_ARGS:
@echo off
set COMMANDLINE_ARGS=--api
call webui.bat
For Linux/macOS:
Edit your webui-user.sh file and add --api to the COMMANDLINE_ARGS:
export COMMANDLINE_ARGS="--api"
./webui.sh
5. Configure Claude Desktop
- Open Claude Desktop
- Go to Settings
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
- Add the following to the
claude_desktop_config.jsonfile (create it if it doesn’t exist):
{
"mcpServers": {
"stable-diffusion": {
"command": "node",
"args": [
"/FULL/PATH/TO/sd-webui-mcp/dist/index.js"
]
}
}
}
Important: Replace /FULL/PATH/TO/ with the actual full path to your project directory. For Windows users, use double backslashes (\\) or forward slashes (/) in your path.
- Save the file and restart Claude Desktop
⚙️ Usage
Step 1: Verify installation
설치
npx @modelcontextprotocol/inspector node /path/to/sd-webui-mcp/dist/index.js설정
{
"mcpServers": {
"stable-diffusion": {
"command": "node",
"args": [
"/FULL/PATH/TO/sd-webui-mcp/dist/index.js"
]
}
}
}