sdnext_mcp
sdnext-mcp
SD.Next(Stable Diffusion Next)WebUI 向けの Model Context Protocol(MCP)サーバーです。
SD.Next の REST API(/sdapi/v1/* + /sdapi/v2/civitai/*)を 125 個の MCP ツールとしてラップし、LLM ホスト(Claude Desktop、DSH など)がテキストから画像への生成、画像から画像への変換、コントロール誘導生成、アップスケーリング、ディテーラー、LoRA、スクリプト、キャプション/タグ付け/VQA、モデルとオプションの管理、サーバー内部情報の取得、ファイル/ギャラリー、CivitAI など、SD.Next のあらゆる利用シナリオを操作できるようにします。
これは薄い HTTP クライアントです。 Python を組み込んでおらず、WebUI を起動しません。SD.Next を
--api --listen付きでご自身で実行する必要があります。MCP サーバーは HTTP 経由で通信するだけです。
これが存在する核となる理由: SD.Next のリクエストパラメータは A1111 とは異なります(モジュラーガイダンス、1024 のデフォルトキャンバス、組み込みの YOLO ディテーラー、独立した軸としてのスケジューラー、UNet/DiT など)。そのため、A1111 用の MCP コードは SD.Next では動作しません。ここにあるすべてのツールは、SD.Next の実際の pydantic リクエストフィールドに基づいてモデル化されています。
要件
Node.js ≥ 18(グローバルな
fetch、FormData、AbortSignal.timeoutを使用)--api --listen付きで起動した実行中の SD.Next インスタンス(認証を有効にするには--api-auth user:passを追加)
Related MCP server: sd-neo-mcp
インストール
cd sdnext_mcp
npm install # installs @modelcontextprotocol/sdk + zod実行
デフォルトは stdio トランスポートです(MCP ホストによって起動されます):
# 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"
}
}
}
}または、Streamable HTTP トランスポートを直接実行します:
SDNEXT_MCP_TRANSPORT=http SDNEXT_MCP_PORT=8787 node src/index.js
# → http://127.0.0.1:8787/mcp設定(環境変数)
変数 | デフォルト | 意味 |
|
| WebUI アドレス |
|
| v1 プレフィックス |
| — | Bearer トークン(最優先) |
| — | HTTP Basic 認証 |
|
| リクエストタイムアウト(生成は遅い) |
|
|
|
|
| HTTP トランスポートのバインド |
|
|
|
| — |
|
ツールファミリー(合計 125 個)
生成 —
sdnext_txt2img、sdnext_img2img、sdnext_control、sdnext_process_image、sdnext_process_batch、sdnext_detail、sdnext_prompt_enhance列挙子 —
sdnext_list_samplers…sdnext_list_masking(29 個のリストツール)画像理解 —
sdnext_caption、sdnext_caption_dispatch、sdnext_tagger、sdnext_vqa、sdnext_analyzeモデル/オプション — チェックポイント、VAE、UNet、LoRA の更新/選択/読み込み、
sdnext_get_options/sdnext_set_optionsサーバー —
sdnext_status、sdnext_progress、中断/スキップ、再起動/シャットダウン、ログ、履歴、ストレージ、GPUファイル/ギャラリー —
sdnext_upload、sdnext_file、delete-、browser/、sdnext_png_infoコントロール処理 —
sdnext_preprocess、sdnext_mask、sdnext_detectモデレーション —
sdnext_nudenet、sdnext_prompt_lang、sdnext_image_guard、sdnext_prompt_bannedCivitAI — 検索、モデル/バージョン、ダウンロードキュー、設定、ブックマーク、禁止、履歴(27 個のツール)
メタ —
sdnext_list_tools、sdnext_call_api(汎用パススルー)、オートコンプリートファイル管理
実行時に sdnext_list_tools を実行して完全なカタログを確認するか、node scripts/dump_tools.mjs を実行してください。
典型的なワークフロー
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 result画像は入出力ともに生の base64 PNG です(data: プレフィックスなし)。画像が入力となる場所では "upload:<id>" 参照が受け入れられます。任意の生成ツールで save_dir を渡すと、結果をディスクにも書き込めます。
スクリプト
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 catalogレイアウト
アーキテクチャのドキュメントについては ../framework/ を参照してください(API の事実は 01-sdnext-api/、設計上の決定は 02-mcp-design/)。ソースは src/ 配下にあります: config.js、client.js、image.js、registry.js、index.js、および tools/(ドメインごとに 1 ファイル)。
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