Image GenSAFE
A MCP server that provides text-to-image generation capabilities using Stable Diffusion WebUI API (ForgeUI/AUTOMATIC-1111)
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A MCP server that provides text-to-image generation capabilities using Stable Diffusion WebUI API (ForgeUI/AUTOMATIC-1111).
Installation
Prerequisites
- Node.js
- Access to a Stable Diffusion WebUI instance with API enabled
- The WebUI must have
--apiflag enabled when starting
Setup
- Clone the repository:
git clone https://github.com/Ichigo3766/image-gen-mcp.git cd image-gen-mcp
- Install dependencies:
npm install
- Build the server:
npm run build
- Add the server configuration to your environment:
{
"mcpServers": {
"image-gen": {
"command": "node",
"args": [
"/path/to/image-gen-mcp/build/index.js"
],
"env": {
"SD_WEBUI_URL": "http://your-sd-webui-url:7860",
"SD_AUTH_USER": "your-username", // Optional: if authentication is enabled
"SD_AUTH_PASS": "your-password", // Optional: if authentication is enabled
"SD_OUTPUT_DIR": "/path/to/output/directory",
"SD_RESIZE_MODE": "0", // Optional: upscaling mode (0=multiplier, 1=dimensions)
"SD_UPSCALE_MULTIPLIER": "4", // Optional: default upscale multiplier
"SD_UPSCALE_WIDTH": "512", // Optional: default upscale width
"SD_UPSCALE_HEIGHT": "512", // Optional: default upscale height
"SD_UPSCALER_1": "R-ESRGAN 4x+", // Optional: default primary upscaler
"SD_UPSCALER_2": "None" // Optional: default secondary upscaler
}
}
}
}Replace the environment variables with your values:
SD_WEBUI_URL: URL of your Stable Diffusion WebUI instanceSD_AUTH_USER: Username for basic auth (if enabled)SD_AUTH_PASS: Password for basic auth (if enabled)- `SDOUTPUTD
50001cb5a178OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add image-gen --env SD_AUTH_PASS=${SD_AUTH_PASS} --env SD_AUTH_USER=${SD_AUTH_USER} -- npx -y [email protected]{
"mcpServers": {
"image-gen": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"SD_AUTH_PASS": "${SD_AUTH_PASS}",
"SD_AUTH_USER": "${SD_AUTH_USER}"
}
}
}
}Exposed tools (5)
4 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
generate_image | read | Generate an image using Stable Diffusion |
get_sd_models | read | Get list of available Stable Diffusion models |
get_sd_upscalers | read | Get list of available upscaler models |
set_sd_model | write | Set the active Stable Diffusion model |
upscale_images | read | Upscale one or more images using Stable Diffusion |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (3 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
const SD_WEBUI_URL = process.env.SD_WEBUI_URL || 'http://127.0.0.1:7860';
@modelcontextprotocol/sdk, @types/node, @types/sharp, axios, form-data, sharp, typescript
Gates applied: no_behavioural_pass.
50001cb5a178full audit observations/trust-audit/mcp-server/ichigo3766__image-gen-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 50001cb5a178 | SAFE | B | 89 | first audit |
Questions
What is the Image Gen MCP server?
A MCP server that provides text-to-image generation capabilities using Stable Diffusion WebUI API (ForgeUI/AUTOMATIC-1111)
What tools does Image Gen expose?
5 in total: 4 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Image Gen safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Image Gen need?
It reads SD_AUTH_PASS and SD_AUTH_USER from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Image Gen run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as image-gen at 0.1.0.
How current is this page?
The grade is for one exact copy of the source (50001cb5a178), read on 2026-10-08. The repository is watched and re-audited when it changes.