sdnext_mcp
sdnext-mcp
Model Context Protocol (MCP)-Server für die SD.Next-WebUI (Stable Diffusion Next).
Er kapselt die REST-API von SD.Next (/sdapi/v1/* + /sdapi/v2/civitai/*) als 125 MCP-Tools, sodass ein LLM-Host (Claude Desktop, DSH usw.) jedes SD.Next-Nutzungsszenario steuern kann: Text-zu-Bild, Bild-zu-Bild, steuerungsgeführte Generierung, Hochskalierung, Detailer, LoRA, Skripte, Beschriftung/Tagging/VQA, Modell- und Optionsverwaltung, Server-Introspektion, Datei/Galerie und CivitAI.
Dies ist ein schlanker HTTP-Client. Er bettet kein Python ein und startet die WebUI nicht. Sie müssen SD.Next selbst mit
--api --listenausführen; der MCP-Server kommuniziert nur über HTTP mit ihm.
Der Hauptgrund für seine Existenz: Die Anforderungsparameter von SD.Next unterscheiden sich von A1111 (modulare Führung, 1024-Standard-Canvas, integrierter YOLO-Detailer, Scheduler als eigene Achse, UNet/DiT usw.), daher funktioniert A1111-MCP-Code damit nicht. Jedes Tool hier ist an den tatsächlichen Pydantic-Anforderungsfeldern von SD.Next modelliert.
Anforderungen
Node.js ≥ 18 (verwendet globales
fetch,FormData,AbortSignal.timeout)Eine laufende SD.Next-Instanz, die mit
--api --listengestartet wurde (fügen Sie--api-auth user:passhinzu, um die Authentifizierung zu aktivieren)
Related MCP server: sd-neo-mcp
Installation
cd sdnext_mcp
npm install # installs @modelcontextprotocol/sdk + zodAusführen
Standard ist stdio-Transport (von Ihrem MCP-Host gestartet):
# in your MCP host config
{
"mcpServers": {
"sdnext": {
"command": "node",
"args": ["/abs/path/to/sdnext_mcp/src/index.js"],
"env": {
"SDNEXT_BASE_URL": "http://127.0.0.1:7860",
"SDNEXT_USERNAME": "user",
"SDNEXT_PASSWORD": "pass"
}
}
}
}Oder führen Sie den Streamable-HTTP-Transport direkt aus:
SDNEXT_MCP_TRANSPORT=http SDNEXT_MCP_PORT=8787 node src/index.js
# → http://127.0.0.1:8787/mcpKonfiguration (Umgebungsvariablen)
Variable | Standard | Bedeutung |
|
| Adresse der WebUI |
|
| v1-Präfix |
| — | Bearer-Token (höchste Priorität) |
| — | HTTP-Basisauthentifizierung |
|
| Anforderungs-Timeout (Generierung ist langsam) |
|
|
|
|
| HTTP-Transportbindung |
|
|
|
| — | Standardverzeichnis für |
Tool-Familien (insgesamt 125)
Generierung —
sdnext_txt2img,sdnext_img2img,sdnext_control,sdnext_process_image,sdnext_process_batch,sdnext_detail,sdnext_prompt_enhanceAufzählungen —
sdnext_list_samplers…sdnext_list_masking(29 Listentools)Bildverständnis —
sdnext_caption,sdnext_caption_dispatch,sdnext_tagger,sdnext_vqa,sdnext_analyzeModelle/Optionen — Checkpoint, VAE, UNet, LoRA aktualisieren/auswählen/laden;
sdnext_get_options/sdnext_set_optionsServer —
sdnext_status,sdnext_progress, Unterbrechen/Überspringen, Neustart/Herunterfahren, Protokoll, Verlauf, Speicher, GPUDateien/Galerie —
sdnext_upload,sdnext_file, delete-, browser/,sdnext_png_infoSteuerungsverarbeitung —
sdnext_preprocess,sdnext_mask,sdnext_detectModeration —
sdnext_nudenet,sdnext_prompt_lang,sdnext_image_guard,sdnext_prompt_bannedCivitAI — Suche, Modell/Variante, Download-Warteschlange, Einstellungen, Lesezeichen, gesperrte, Verlauf (27 Tools)
Meta —
sdnext_list_tools,sdnext_call_api(generischer Durchgriff), Autovervollständigungs-Dateiverwaltung
Führen Sie zur Laufzeit sdnext_list_tools für den vollständigen Katalog aus, oder node scripts/dump_tools.mjs.
Typischer Arbeitsablauf
sdnext_list_checkpoints → pick a model
sdnext_list_samplers → pick a sampler
sdnext_txt2img { prompt, sd_model_checkpoint, sampler_name, width:1024, height:1024, steps:20 }
sdnext_progress → poll while it runs
sdnext_caption / sdnext_tagger → understand a resultBilder sind rohe Base64-PNGs ein- und ausgehend (ohne data:-Präfix); "upload:<id>"-Verweise werden akzeptiert, wo ein Bild eine Eingabe ist. Übergeben Sie save_dir an ein beliebiges Generierungstool, um das Ergebnis auch auf die Festplatte zu schreiben.
Skripte
npm run check # syntax-check the entry
node scripts/smoke.mjs # DRY_RUN stdio smoke test (no live server needed)
node scripts/dump_tools.mjs # export the tool catalogAufbau
Siehe ../framework/ für die Architekturdokumentation (API-Fakten in 01-sdnext-api/, Designentscheidungen in 02-mcp-design/). Quellcode unter src/: config.js, client.js, image.js, registry.js, index.js und tools/ (eine Datei pro Domäne).
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceDynamically loads ComfyUI workflows as MCP tools, enabling AI assistants to generate images, videos, and audio by executing workflows across categories like text-to-image, image-to-video, and text-to-audio with automatic parameter mapping and progress monitoring.123,4783MIT
- AlicenseNot gradedqualityBmaintenanceMCP server and CLI tool connecting to SD WebUI Forge NEO, enabling image generation, model management, and more via natural language.MIT
- AlicenseNot gradedqualityBmaintenanceWraps ComfyUI to generate images, video, and upscales from text prompts via MCP tools, providing a curated workflow interface without the node editor.3MIT
- FlicenseNot gradedqualityBmaintenanceExposes Stable Diffusion for text-to-image generation and GPT-SoVITS for text-to-speech synthesis as MCP tools, enabling image and audio generation via natural language.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
Generate images with any major model — one API key, one prepaid balance, one MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Congenital/sdnext_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server