sdnext_mcp
Provides YOLO-based object and face detection on images, including the built-in detailer for targeted inpainting and enhancement.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sdnext_mcp generate an image of a steampunk airship in the clouds"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sdnext-mcp
Model Context Protocol (MCP) server for SD.Next (Stable Diffusion Next) WebUI.
It wraps SD.Next's REST API (/sdapi/v1/* + /sdapi/v2/civitai/*) as 125 MCP tools so an LLM host (Claude Desktop, DSH, etc.) can drive every SD.Next usage scenario: text-to-image, image-to-image, control-guided generation, upscaling, detailer, LoRA, scripts, captioning/tagging/VQA, model & option management, server introspection, file/gallery, and CivitAI.
This is a thin HTTP client. It does not embed Python and does not launch the WebUI. You must run SD.Next yourself with
--api --listen; the MCP server just talks to it over HTTP.
The core reason this exists: SD.Next's request parameters differ from A1111 (modular guidance, 1024 default canvas, built-in YOLO detailer, schedulers as a separate axis, UNet/DiT, etc.), so A1111 MCP code does not work against it. Every tool here is modeled on SD.Next's actual pydantic request fields.
Requirements
Node.js ≥ 18 (uses global
fetch,FormData,AbortSignal.timeout)A running SD.Next instance started with
--api --listen(add--api-auth user:passto enable auth)
Related MCP server: sd-api-mcp
Install
cd sdnext_mcp
npm install # installs @modelcontextprotocol/sdk + zodRun
Default is stdio transport (spawned by your MCP host):
# 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"
}
}
}
}Or run the Streamable HTTP transport directly:
SDNEXT_MCP_TRANSPORT=http SDNEXT_MCP_PORT=8787 node src/index.js
# → http://127.0.0.1:8787/mcpConfiguration (env vars)
Var | Default | Meaning |
|
| WebUI address |
|
| v1 prefix |
| — | Bearer token (highest priority) |
| — | HTTP Basic auth |
|
| Request timeout (generation is slow) |
|
|
|
|
| HTTP transport bind |
|
|
|
| — | Default dir for |
Tool families (125 total)
Generation —
sdnext_txt2img,sdnext_img2img,sdnext_control,sdnext_process_image,sdnext_process_batch,sdnext_detail,sdnext_prompt_enhanceEnumerators —
sdnext_list_samplers…sdnext_list_masking(29 list tools)Image understanding —
sdnext_caption,sdnext_caption_dispatch,sdnext_tagger,sdnext_vqa,sdnext_analyzeModels/options — refresh/select/load checkpoint, VAE, UNet, LoRA;
sdnext_get_options/sdnext_set_optionsServer —
sdnext_status,sdnext_progress, interrupt/skip, restart/shutdown, log, history, storage, GPUFiles/Gallery —
sdnext_upload,sdnext_file, delete-, browser/,sdnext_png_infoControl processing —
sdnext_preprocess,sdnext_mask,sdnext_detectModeration —
sdnext_nudenet,sdnext_prompt_lang,sdnext_image_guard,sdnext_prompt_bannedCivitAI — search, model/version, download queue, settings, bookmarks, banned, history (27 tools)
Meta —
sdnext_list_tools,sdnext_call_api(generic passthrough), autocomplete file mgmt
Run sdnext_list_tools at runtime for the full catalog, or node scripts/dump_tools.mjs.
Typical workflow
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 resultImages are raw base64 PNG in and out (no data: prefix); "upload:<id>" refs are accepted where an image is an input. Pass save_dir on any generation tool to also write the result to disk.
Scripts
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 catalogTesting
npm test # run the unit test suite
npm run coverage # run tests with coverage; fails if any src/*.js file is under 80% branch coverageLayout
See ../framework/ for the architecture documentation (API facts in 01-sdnext-api/, design decisions in 02-mcp-design/). Source under src/: config.js, client.js, image.js, registry.js, app.js (builds the server and its transports), index.js (tiny CLI bootstrap), and tools/ (one file per domain).
Available Tools
125 toolssdnext_analyzeAnalyze Image (VLM)B
Analyze an image with the VLM "analyze" task (SD.Next /sdapi/v1/analyze). Same request shape as sdnext_vqa.
Inputs: image (required), model, top_k, top_p, +12 more.
sdnext_autocompleteList Autocomplete FilesA
List local autocomplete/tag list files (GET /sdapi/v1/autocomplete).
Inputs: no named parameters.
sdnext_autocomplete_contentRead Autocomplete FileA
Get the content of a local autocomplete/tag-list file (GET /sdapi/v1/autocomplete/{name}).
Inputs: name (required).
sdnext_autocomplete_deleteDelete Autocomplete FileADestructive
Delete a local autocomplete/tag-list file (DELETE /sdapi/v1/autocomplete/{name}). DESTRUCTIVE.
Inputs: name (required).
sdnext_autocomplete_downloadDownload Autocomplete FileA
Download an autocomplete/tag-list file from a remote source (POST /sdapi/v1/autocomplete/{name}/download).
Inputs: name (required).
sdnext_autocomplete_remoteList Remote Autocomplete FilesA
List remote autocomplete files with update status (GET /sdapi/v1/autocomplete/remote).
Inputs: no named parameters.
sdnext_browser_filesList Output FilesB
List files in an output folder as "folder##F##file" lines (GET /sdapi/v1/browser/files?folder=...).
Inputs: folder (required).
sdnext_browser_foldersList Output FoldersA
List output/gallery folders with labels (GET /sdapi/v1/browser/folders).
Inputs: no named parameters.
sdnext_browser_thumbOutput ThumbnailC
Get a thumbnail for an output file (GET /sdapi/v1/browser/thumb?file=...).
Inputs: file (required), exif.
sdnext_call_apiGeneric API PassthroughA
Call any SD.Next REST endpoint directly (v1 or v2, any method). Path may be absolute ("/sdapi/v1/samplers") or relative to /sdapi/v1 ("samplers"). Use only when no dedicated tool fits; prefer dedicated sdnext_* tools.
Inputs: path (required), body, query, method.
sdnext_captionCaption Image (OpenCLIP)B
Generate a text caption/prompt from an image using OpenCLIP+BLIP (SD.Next /sdapi/v1/openclip POST). mode: best|fast|classic|caption|negative. Set analyze=true for medium/artist/movement/trending/flavor breakdown.
Inputs: image (required), mode, model, analyze, +8 more.
sdnext_caption_dispatchCaption (any backend)B
Unified caption dispatch (SD.Next /sdapi/v1/caption) — pick backend: "openclip" | "tagger" | "vlm" | "analyze". Returns a unified response (caption/tags/answer depending on backend).
Inputs: image (required), backend (required), mode, model, +26 more.
sdnext_civitai_add_bannedBan ModelC
Ban a CivitAI model name (POST /sdapi/v2/civitai/banned).
Inputs: name (required).
sdnext_civitai_add_bookmarkAdd BookmarkB
Bookmark a CivitAI model name (POST /sdapi/v2/civitai/bookmarks).
Inputs: name (required).
sdnext_civitai_bannedList Banned ModelsA
List banned CivitAI model names (GET /sdapi/v2/civitai/banned).
Inputs: no named parameters.
sdnext_civitai_bookmarksList BookmarksA
List bookmarked CivitAI models (GET /sdapi/v2/civitai/bookmarks).
Inputs: no named parameters.
sdnext_civitai_check_localCheck Local by HashesA
Check which of the given file hashes are already present locally (POST /sdapi/v2/civitai/check-local).
Inputs: hashes (required).
sdnext_civitai_clear_historyClear HistoryA
Clear CivitAI search history (DELETE via POST /sdapi/v2/civitai/history).
Inputs: no named parameters.
sdnext_civitai_creatorsCivitAI CreatorsC
Search CivitAI creators (GET /sdapi/v2/civitai/creators).
Inputs: page, limit, query.
sdnext_civitai_downloadCivitAI DownloadA
Queue a model file download to the models dir (POST /sdapi/v2/civitai/download). url is required; use model_id/version_id from search results to resolve paths.
Inputs: url (required), nsfw, token, folder, +9 more.
sdnext_civitai_download_cancelCancel DownloadA
Cancel a queued CivitAI download (POST /sdapi/v2/civitai/download/{download_id}/cancel).
Inputs: download_id (required).
sdnext_civitai_download_statusDownload StatusA
List queued/in-progress CivitAI downloads (GET /sdapi/v2/civitai/download/status).
Inputs: no named parameters.
sdnext_civitai_historySearch HistoryA
List CivitAI search history (GET /sdapi/v2/civitai/history).
Inputs: search_type.
sdnext_civitai_imagesCivitAI Model ImagesC
List images for a CivitAI model or version (GET /sdapi/v2/civitai/images).
Inputs: limit, model_id, model_version_id.
sdnext_civitai_legacyCivitAI Legacy SearchA
Legacy CivitAI search endpoint (GET /sdapi/v1/civitai). Use sdnext_civitai_search for the v2 API instead.
Inputs: tag, base, nsfw, sort, +6 more.
sdnext_civitai_meCivitAI MeB
Get the authenticated CivitAI user (GET /sdapi/v2/civitai/me). Requires a configured token.
Inputs: no named parameters.
sdnext_civitai_metadata_scanMetadata ScanB
Scan local model files and match CivitAI metadata (POST /sdapi/v2/civitai/metadata/scan).
Inputs: no named parameters.
sdnext_civitai_metadata_updateMetadata UpdateA
Update sidecar metadata for local models (POST /sdapi/v2/civitai/metadata/update).
Inputs: no named parameters.
sdnext_civitai_modelCivitAI ModelB
Get a single CivitAI model by ID (GET /sdapi/v2/civitai/model/{model_id}).
Inputs: model_id (required).
sdnext_civitai_remove_bannedUnban ModelA
Remove a banned model name (DELETE via POST /sdapi/v2/civitai/banned/{name}).
Inputs: name (required).
sdnext_civitai_remove_bookmarkRemove BookmarkB
Remove a CivitAI bookmark (DELETE via POST /sdapi/v2/civitai/bookmarks/{name}).
Inputs: name (required).
sdnext_civitai_resolve_pathResolve Model PathC
Resolve the local save path for a CivitAI model/version (GET /sdapi/v2/civitai/resolve-path).
Inputs: nsfw, creator, model_id, base_model, +4 more.
sdnext_civitai_searchCivitAI SearchA
Search CivitAI models (GET /sdapi/v2/civitai/search). Filters: query, tag, types, sort, period, base_models, nsfw, limit, cursor.
Inputs: tag, nsfw, sort, limit, +7 more.
sdnext_civitai_set_settingsSet CivitAI SettingsC
Update CivitAI integration settings (POST /sdapi/v2/civitai/settings): token, save_subfolder, save_subfolder_enabled, discard_hash_mismatch.
Inputs: token, save_subfolder, discard_hash_mismatch, save_subfolder_enabled.
sdnext_civitai_settingsCivitAI SettingsA
Get CivitAI integration settings (GET /sdapi/v2/civitai/settings).
Inputs: no named parameters.
sdnext_civitai_tagsCivitAI TagsC
Search CivitAI tags (GET /sdapi/v2/civitai/tags).
Inputs: page, limit, query.
sdnext_civitai_versionCivitAI Model VersionB
Get a single CivitAI model version by ID (GET /sdapi/v2/civitai/version/{version_id}).
Inputs: version_id (required).
sdnext_civitai_version_by_hashCivitAI Version by HashB
Resolve a CivitAI version by file hash (GET /sdapi/v2/civitai/version/by-hash/{hash}).
Inputs: hash (required).
sdnext_cmd_flagsCommand FlagsA
Get all command-line flags the server was started with (GET /sdapi/v1/cmd-flags).
Inputs: no named parameters.
sdnext_controlControl-guided GenerationA
Run the control-guided pipeline (SD.Next /sdapi/v1/control) with one or more control units (controlnet / t2i adapter / xs / lite / reference / ip). Returns generated images plus preprocessor output maps.
Inputs: prompt (required), control_units (required), xyz, face, +45 more.
sdnext_delete_fileDelete FileBDestructive
Delete a file (DELETE /sdapi/v1/delete-file?file=...). DESTRUCTIVE.
Inputs: file (required).
sdnext_delete_imageDelete ImageADestructive
Delete a generated image file (DELETE /sdapi/v1/delete-image?file=...). DESTRUCTIVE.
Inputs: file (required).
sdnext_detailDetailer PassC
Run the YOLO detailer on a single image as a standalone operation (SD.Next /sdapi/v1/detail) — no base generation pass. All detailer_* fields fall back to global settings when omitted.
Inputs: image (required), seed, save_dir, detailer_iou, +27 more.
sdnext_detectDetect Faces/Objects (YOLO)A
Detect faces/objects in an image with YOLO (SD.Next /sdapi/v1/detect). Returns classes, labels, boxes, crops, scores.
Inputs: image (required), model.
sdnext_extra_network_detailExtra Network DetailB
Get detailed metadata for one extra network item (GET /sdapi/v1/extra-network-detail).
Inputs: name (required), page (required).
sdnext_extra_network_detailsExtra Network Details (batch)C
Batch-fetch full details for extra network items with pagination (GET /sdapi/v1/extra-network-details).
Inputs: hash, name, page, limit, +4 more.
sdnext_fileFetch Server FileA
Fetch a file from the server (GET /sdapi/v1/file?file=...) as raw content. Must be inside an allowed dir (outputs, temp, models...).
Inputs: file (required).
sdnext_get_checkpointGet Active CheckpointA
Get info about the currently loaded checkpoint (GET /sdapi/v1/checkpoint).
Inputs: no named parameters.
sdnext_get_optionsGet OptionsA
Get all current UI/server options (GET /sdapi/v1/options).
Inputs: no named parameters.
sdnext_gpuGPU InfoA
Get GPU device info (GET /sdapi/v1/gpu).
Inputs: no named parameters.
sdnext_gpu_smiGPU SMI MetricsA
Get detailed GPU metrics: name, utilization, temperature, memory, clocks (GET /sdapi/v1/gpu-smi).
Inputs: no named parameters.
sdnext_historyGeneration HistoryC
Get generation history entries (GET /sdapi/v1/history).
Inputs: id.
sdnext_image_guardImage Guard PolicyC
Run an image through a content-safety policy/guard model (SD.Next /sdapi/v1/image-guard).
Inputs: image (required), model, policy.
sdnext_img2imgImage to ImageB
Generate images from input images with denoising (SD.Next /sdapi/v1/img2img). Supports inpainting via mask (white = repaint), color correction, hires fix, control units, and all txt2img parameters. init_images are base64 (or "upload:" refs).
Inputs: prompt (required), xyz, face, mask, +74 more.
sdnext_interruptInterrupt GenerationA
Interrupt the current generation job (POST /sdapi/v1/interrupt).
Inputs: no named parameters.
sdnext_latent_historySelect Latent History EntryA
Select a latent history entry by name (POST /sdapi/v1/latents) for "Vary (Z)"-style latent reuse. List entries via sdnext_list_latents.
Inputs: name (required).
sdnext_list_checkpointsList CheckpointsA
List all registered checkpoint models with title, filename, type and hash (GET /sdapi/v1/sd-models). Use model_name or filename for sd_model_checkpoint.
Inputs: no named parameters.
sdnext_list_control_modesList Control ModesA
List valid control modes for Union/ProMax models (GET /sdapi/v1/control-modes).
Inputs: no named parameters.
sdnext_list_controlnetsList Control ModelsC
List available ControlNet models, optionally filtered by model type (GET /sdapi/v1/controlnets).
Inputs: model_type.
sdnext_list_detailersList Detailer ModelsA
List available YOLO detailer models (GET /sdapi/v1/detailers).
Inputs: no named parameters.
sdnext_list_embeddingsList EmbeddingsA
List textual-inversion embeddings loaded/skipped for the current model (GET /sdapi/v1/embeddings).
Inputs: no named parameters.
sdnext_list_extensionsList ExtensionsA
List installed extensions (GET /sdapi/v1/extensions).
Inputs: no named parameters.
sdnext_list_extra_networksList Extra NetworksA
List extra networks of a page type (lora, checkpoint, embedding, lyco, hypernetwork...) with optional filters (GET /sdapi/v1/extra-networks).
Inputs: hash, name, page, title, +2 more.
sdnext_list_face_restorersList Face RestorersA
List available face restoration models (GET /sdapi/v1/face-restorers).
Inputs: no named parameters.
sdnext_list_ip_adaptersList IP AdaptersA
List available IP adapter models (GET /sdapi/v1/ip-adapters).
Inputs: no named parameters.
sdnext_list_latentsList Latent HistoryA
List available latent history entry names (GET /sdapi/v1/latents).
Inputs: no named parameters.
sdnext_list_loaded_lorasList Loaded LoRAsA
List currently loaded LoRA names (GET /sdapi/v1/loaded-loras).
Inputs: no named parameters.
sdnext_list_lorasList LoRAsA
List all LoRA models (GET /sdapi/v1/loras). Use in prompt as lora:name:weight.
Inputs: no named parameters.
sdnext_list_maskingList Masking OptionsA
List segmentation mask models, color maps, params and types (GET /sdapi/v1/masking).
Inputs: no named parameters.
sdnext_list_openclipList OpenCLIP ModelsA
List available OpenCLIP captioning models (GET /sdapi/v1/openclip).
Inputs: no named parameters.
sdnext_list_preprocessorsList Control PreprocessorsA
List control preprocessors with groups and configurable params (GET /sdapi/v1/preprocessors).
Inputs: no named parameters.
sdnext_list_samplersList SamplersA
List available samplers and their options (GET /sdapi/v1/samplers). Use the returned names for sampler_name.
Inputs: no named parameters.
sdnext_list_schedulersList SchedulersA
List available schedulers with class and options (GET /sdapi/v1/schedulers).
Inputs: no named parameters.
sdnext_list_scriptsList ScriptsA
List available scripts with arguments (GET /sdapi/v1/scripts). Use name for script_name.
Inputs: no named parameters.
sdnext_list_stylesList Prompt StylesA
List prompt styles (GET /sdapi/v1/prompt-styles). Apply via styles: ["style name"].
Inputs: no named parameters.
sdnext_list_tagger_modelsList Tagger ModelsA
List available tagger models (wd-tagger, deepdanbooru, etc.) (GET /sdapi/v1/tagger/models).
Inputs: no named parameters.
sdnext_list_toolsList MCP ToolsA
List every tool exposed by this MCP server with its name, HTTP method, API path, and description. Use this to discover what is available before calling sdnext_call_api.
Inputs: no named parameters.
sdnext_list_unetsList UNet/DiTA
List available UNet/DiT models (GET /sdapi/v1/unets).
Inputs: no named parameters.
sdnext_list_upscalersList UpscalersA
List available upscalers with model name, path and scale (GET /sdapi/v1/upscalers).
Inputs: no named parameters.
sdnext_list_vaeList VAEsA
List available VAE models (GET /sdapi/v1/sd-vae).
Inputs: no named parameters.
sdnext_list_vqa_modelsList VLM ModelsA
List vision-language models with prompts and capabilities (GET /sdapi/v1/vqa/models).
Inputs: no named parameters.
sdnext_list_vqa_promptsList VLM Prompt TasksA
List task prompts available for a VLM (GET /sdapi/v1/vqa/prompts).
Inputs: model.
sdnext_list_wildcardsList WildcardsB
List wildcard files available for wildcard:name syntax (GET /sdapi/v1/wildcards).
Inputs: no named parameters.
sdnext_list_xyz_optionsList XYZ Grid OptionsB
List XYZ grid axis options, optionally filtered by prefix (GET /sdapi/v1/xyz-grid).
Inputs: option.
sdnext_loaded_modelsLoaded ModelsA
List all loaded models by category (pipeline, lora, upscaler, ...) with device and size (GET /sdapi/v1/loaded-models).
Inputs: no named parameters.
sdnext_lock_checkpointLock CheckpointA
Prevent the current checkpoint from being unloaded (POST /sdapi/v1/lock-checkpoint).
Inputs: no named parameters.
sdnext_logServer LogA
Get recent server log lines (GET /sdapi/v1/log).
Inputs: clear, lines.
sdnext_log_writeWrite to LogB
Append a message to the server log (POST /sdapi/v1/log).
Inputs: json, debug, error, message.
sdnext_maskGenerate Segmentation MaskA
Generate a segmentation mask for an image (SD.Next /sdapi/v1/mask). Auto-masks when no mask is given. Mask models/types from sdnext_list_masking.
Inputs: type (required), image (required), mask, model, +1 more.
sdnext_memoryMemory InfoA
Get CPU/GPU memory usage (GET /sdapi/v1/memory).
Inputs: no named parameters.
sdnext_modulesLoaded ModulesA
List loaded model modules (GET /sdapi/v1/modules).
Inputs: no named parameters.
sdnext_motdMessage of the DayA
Get the server MOTD text (GET /sdapi/v1/motd).
Inputs: no named parameters.
sdnext_network_thumbNetwork ThumbnailC
Get a thumbnail for an extra-network item (GET /sdapi/v1/network/thumb?file=...).
Inputs: file (required).
sdnext_nudenetNudeNet CensorB
Censor explicit regions in an image with NudeNet (SD.Next /sdapi/v1/nudenet). Methods: pixelate, blur, mosaic, overlay.
Inputs: image (required), score, blocks, censor, +2 more.
sdnext_options_infoOptions InfoA
Get metadata for every option: label, section, type, default, component (GET /sdapi/v1/options-info).
Inputs: no named parameters.
sdnext_platformPlatform InfoA
Get platform/hardware info (GET /sdapi/v1/platform).
Inputs: no named parameters.
sdnext_png_infoRead Image MetadataA
Extract generation parameters from a PNG image (POST /sdapi/v1/png-info). Returns raw info string, items dict, and parsed parameters (prompt, seed, sampler, ...).
Inputs: image (required).
sdnext_preprocessRun Control PreprocessorA
Run a control preprocessor (canny, depth, pose, lineart, ...) on an image and return the processed map (SD.Next /sdapi/v1/preprocess). Preprocessor names from sdnext_list_preprocessors.
Inputs: image (required), model (required), params.
sdnext_process_batchUpscale / Process BatchC
Process multiple images at once (SD.Next /sdapi/v1/process-batch). Same options as sdnext_process_image plus an images array.
Inputs: images (required), save_dir, upscaler_1, upscaler_2, +8 more.
sdnext_process_imageUpscale / Process ImageA
Process a single image with the Extras pipeline (upscalers, e.g. from sdnext_list_upscalers). SD.Next /sdapi/v1/process. resize_mode 0 = factor, 1 = target w/h.
Inputs: image (required), save_dir, upscaler_1, upscaler_2, +8 more.
sdnext_progressQueue ProgressA
Poll generation progress: progress 0-1, ETA, state, current image (GET /sdapi/v1/progress).
Inputs: skip_current_image.
sdnext_prompt_bannedCheck Banned WordsA
Check a prompt against a banned-words list and return matched words (SD.Next /sdapi/v1/prompt-banned).
Inputs: prompt (required), words.
sdnext_prompt_enhanceEnhance PromptC
Enhance/expand a prompt with an LLM (SD.Next /sdapi/v1/prompt-enhance). Type: text, image, or video.
Inputs: prompt (required), nsfw, seed, type, +22 more.
sdnext_prompt_langCheck Prompt LanguageA
Check whether a prompt uses an allowed language/alphabet (SD.Next /sdapi/v1/prompt-lang).
Inputs: prompt (required), lang, alphabet.
sdnext_refresh_checkpointsRefresh CheckpointsA
Rescan checkpoint model folders (POST /sdapi/v1/refresh-checkpoints).
Inputs: no named parameters.
sdnext_refresh_lorasRefresh LoRAsA
Rescan LoRA model folders (POST /sdapi/v1/refresh-loras).
Inputs: no named parameters.
sdnext_refresh_unetsRefresh UNetsB
Rescan UNet/DiT model folders (POST /sdapi/v1/refresh-unets).
Inputs: no named parameters.
sdnext_refresh_vaeRefresh VAEsB
Rescan VAE model folders (POST /sdapi/v1/refresh-vae).
Inputs: no named parameters.
sdnext_reload_checkpointReload CheckpointC
Reload the current checkpoint into VRAM (POST /sdapi/v1/reload-checkpoint).
Inputs: force.
sdnext_restartRestart ServerBDestructive
Restart the SD.Next server (POST /sdapi/v1/restart). DESTRUCTIVE.
Inputs: no named parameters.
sdnext_script_infoScript InfoB
Get info for a single script (GET /sdapi/v1/script-info).
Inputs: name (required), img2img.
sdnext_select_checkpointSelect CheckpointA
Select which checkpoint model is active (POST /sdapi/v1/checkpoint). Give the checkpoint name or filename.
Inputs: checkpoint (required).
sdnext_session_startSession StartB
Get session start info (GET /sdapi/v1/start). Optionally pass the agent name.
Inputs: agent.
sdnext_set_optionsSet OptionsA
Set UI/server options at runtime (POST /sdapi/v1/options). Body: {"options": {name: value, ...}}. Discover valid keys with sdnext_get_options / sdnext_options_info.
Inputs: options (required).
sdnext_shutdownShutdown ServerADestructive
Shut down the SD.Next server (POST /sdapi/v1/shutdown). DESTRUCTIVE.
Inputs: no named parameters.
sdnext_skipSkip ImageA
Skip the current image in the queue (POST /sdapi/v1/skip).
Inputs: no named parameters.
sdnext_statusServer StatusB
Get server/queue status: current job, step/steps, queue, uptime (GET /sdapi/v1/status).
Inputs: no named parameters.
sdnext_storageStorage UsageA
Get storage folder usage stats (GET /sdapi/v1/storage).
Inputs: types, folder.
sdnext_taggerAnime TaggerA
Tag an image with anime tags (Danbooru-style) using wd-tagger / DeepDanbooru (SD.Next /sdapi/v1/tagger). Model names from sdnext_list_tagger_models.
Inputs: image (required), model, max_tags, threshold, +7 more.
sdnext_torchTorch InfoB
Get torch/GPU build info (GET /sdapi/v1/torch).
Inputs: no named parameters.
sdnext_txt2imgText to ImageA
Generate images from text prompts (SD.Next /sdapi/v1/txt2img). Supports samplers, modular guidance, hires fix, refiner, detailer, LoRA (prompt lora:name:weight), styles, scripts, control units, face modules, XYZ grid. Returns base64 images, info string, and echoed parameters.
Inputs: prompt (required), xyz, face, seed, +61 more.
sdnext_unload_checkpointUnload CheckpointA
Unload the currently loaded checkpoint to free VRAM (POST /sdapi/v1/unload-checkpoint).
Inputs: no named parameters.
sdnext_uploadUpload FileA
Upload a file to the SD.Next server (POST /sdapi/v1/upload, multipart form). Files land in the system temp dir (or relative to datadir when path is given). The server accepts "upload:" refs in image fields afterwards.
Inputs: filename (required), content_base64 (required), mime, path, +1 more.
sdnext_versionServer VersionA
Get SD.Next version info (GET /sdapi/v1/version).
Inputs: no named parameters.
sdnext_vqaVQA / VLM AnalysisB
Ask a vision-language model about an image (SD.Next /sdapi/v1/vqa). Question is a task name (e.g. "Short Caption", "Object Detection", "Use Prompt"). Models from sdnext_list_vqa_models, tasks from sdnext_list_vqa_prompts.
Inputs: image (required), model, top_k, top_p, +12 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 125 tools
Many tools are unique resource/action pairs, but the set contains ambiguous clusters: legacy vs v2 CivitAI search, extra_network_detail vs extra_network_details, caption vs caption_dispatch vs tagger vs vqa vs analyze, and status vs progress. With 125 tools, agents are likely to mis-select despite good individual descriptions.
The sdnext_ prefix and snake_case are consistent, and list_* verbs are used widely. However conventions drift: some names are resource nouns (sdnext_civitai_model, sdnext_browser_thumb, sdnext_latent_history), while others are verb_objects (sdnext_add_bookmark), and several list/action pairs (bookmarks vs add_bookmark, banned vs add_banned) are not uniform.
125 tools is an extreme count for an MCP server. This is effectively a 1:1 wrapper for the full REST API, not a curated tool set, and would overwhelm any agent trying to select the right tool.
Coverage is impressively broad: model discovery, generation, control, image processing, captioning, CivitAI downloads, options, server management, and file operations are all represented. Minor gaps exist (e.g. no dedicated prompt-style CRUD or detailed history retrieval), but the generic sdnext_call_api fallback and delete_file cover most dead ends.
Related MCP Connectors
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate images and videos with Seedance, Veo, Wan, Grok, GPT-Image and Nano Banana via one MCP.
1
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes 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.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to interact with a Stable Diffusion REST API for image generation, inpainting, model management, and merging.18GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to generate images and videos through natural language by exposing ComfyUI workflows as parameter-configurable MCP tools.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to generate and edit images using local Stable Diffusion models in ComfyUI, with tools for text-to-image, img2img, ControlNet, UI frames, upscaling, and background removal—no cloud API or API key required.MIT