MCP server for Stable Diffusion image generation
## Stability AI MCP Server: Generative AI Platform The **Stability AI MCP Server** integrates Stability AI's generative models into Google Antigravity. This platform powers Stable Diffusion and other groundbreaking models for image generation, editing, and creative AI applications. ### Why Stability AI MCP? Stability AI leads open generative AI: - **Stable Diffusion**: Industry-leading image generation - **SDXL**: Highest quality image synthesis - **Image Editing**: Inpainting, outpainting, upscaling - **Open Models**: Self-host or use API - **Commercial Use**: Clear licensing for business ### Key Features #### 1. Image Generation ```python from stability_sdk import client import stability_sdk.interfaces.gooseai.generation.generation_pb2 as generation stability_api = client.StabilityInference( key="your-key", engine="stable-diffusion-xl-1024-v1-0" ) # Generate image answers = stability_api.generate( prompt="A serene Japanese garden with cherry blossoms", seed=42, steps=30, cfg_scale=7.0, width=1024, height=1024 ) for resp in answers: for artifact in resp.artifacts: if artifact.type == generation.ARTIFACT_IMAGE: with open("garden.png", "wb") as f: f.write(artifact.binary) ``` #### 2. Image-to-Image ```python # Transform existing images answers = stability_api.generate( prompt="Convert to oil painting style", init_image=open("photo.png", "rb"), start_schedule=0.6, # How much to transform steps=30 ) ``` #### 3. Upscaling ```python # Upscale images 4x answers = stability_api.upscale( init_image=open("small.png", "rb"), width=2048 ) ``` ### Configuration ```json { "mcpServers": { "stability-ai": { "command": "npx", "args": ["-y", "@anthropic/mcp-stability"], "env": { "STABILITY_API_KEY": "sk-your-key" } } } } ``` ### Use Cases **Asset Generation**: Create unique images for applications and marketing. **Image Enhancement**: Upscale and improve existing images. **Creative Tools**: Build image editing and generation features. The Stability AI MCP Server brings generative image AI to Antigravity.
{
"mcpServers": {
"stability-ai": {
"mcpServers": {
"stability-ai": {
"env": {
"STABILITY_API_KEY": "YOUR_STABILITY_API_KEY"
},
"args": [
"-y",
"mcp-server-stability-ai"
],
"command": "npx"
}
}
}
}
}