Stability AI MCP Server

stability-ai-replace-background-and-relight

Replace or edit the background and adjust lighting in images using customizable prompts and reference images. Control light source direction and strength to enhance visual results.

Instructions

Replace background and adjust lighting of an image

Input Schema

NameRequiredDescriptionDefault
backgroundPromptNoDescription of the desired background
backgroundReferenceUriNoOptional URI to a reference image for background style
foregroundPromptNoOptional description of the subject to prevent background bleeding
imageFileUriYesThe URI to the subject image file. It should start with file://
keepOriginalBackgroundNoWhether to keep the original background
lightReferenceUriNoOptional URI to a reference image for lighting
lightSourceDirectionNoDirection of the light source
lightSourceStrengthNoStrength of the light source (0-1)
negativePromptNoOptional description of what you don't want to see
originalBackgroundDepthNoControl background depth matching (0-1)
outputImageFileNameYesThe desired name of the output image file, no file extension. Make it descriptive but short. Lowercase, dash-separated, no special characters.
preserveOriginalSubjectNoHow much to preserve the original subject (0-1)

Input Schema (JSON Schema)

{ "properties": { "backgroundPrompt": { "description": "Description of the desired background", "type": "string" }, "backgroundReferenceUri": { "description": "Optional URI to a reference image for background style", "type": "string" }, "foregroundPrompt": { "description": "Optional description of the subject to prevent background bleeding", "type": "string" }, "imageFileUri": { "description": "The URI to the subject image file. It should start with file://", "type": "string" }, "keepOriginalBackground": { "description": "Whether to keep the original background", "type": "boolean" }, "lightReferenceUri": { "description": "Optional URI to a reference image for lighting", "type": "string" }, "lightSourceDirection": { "description": "Direction of the light source", "enum": [ "above", "below", "left", "right" ], "type": "string" }, "lightSourceStrength": { "description": "Strength of the light source (0-1)", "type": "number" }, "negativePrompt": { "description": "Optional description of what you don't want to see", "type": "string" }, "originalBackgroundDepth": { "description": "Control background depth matching (0-1)", "type": "number" }, "outputImageFileName": { "description": "The desired name of the output image file, no file extension. Make it descriptive but short. Lowercase, dash-separated, no special characters.", "type": "string" }, "preserveOriginalSubject": { "description": "How much to preserve the original subject (0-1)", "type": "number" } }, "required": [ "imageFileUri", "outputImageFileName" ], "type": "object" }
ID: arwjcxkkhg