sdnext_mcp
sdnext-mcp
SD.Next(Stable Diffusion Next) WebUI용 MCP(Model Context Protocol) 서버입니다.
SD.Next의 REST API(/sdapi/v1/* + /sdapi/v2/civitai/*)를 125개의 MCP 도구로 감싸서, LLM 호스트(Claude Desktop, DSH 등)가 텍스트-이미지 생성, 이미지-이미지 변환, 제어된 생성, 업스케일링, 디테일러, LoRA, 스크립트, 캡셔닝/태깅/VQA, 모델 및 옵션 관리, 서버 내부 조회, 파일/갤러리, CivitAI 등 SD.Next의 모든 사용 시나리오를 구동할 수 있게 합니다.
이것은 얇은 HTTP 클라이언트입니다. Python을 내장하지 않으며 WebUI를 실행하지 않습니다.
--api --listen으로 SD.Next를 직접 실행해야 합니다. MCP 서버는 HTTP를 통해 SD.Next와 통신할 뿐입니다.
이것이 존재하는 핵심 이유: SD.Next의 요청 매개변수는 A1111과 다릅니다(모듈식 가이던스, 1024 기본 캔버스, 내장 YOLO 디테일러, 별도 축으로서의 스케줄러, UNet/DiT 등). 따라서 A1111용 MCP 코드는 SD.Next에서 작동하지 않습니다. 여기의 모든 도구는 SD.Next의 실제 pydantic 요청 필드를 기반으로 모델링되었습니다.
설치
cd sdnext_mcp
npm install # installs @modelcontextprotocol/sdk + zodRelated MCP server: sd-neo-mcp
실행
기본값은 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모델/옵션 — checkpoint, 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이미지는 data: 접두어 없이 raw base64 PNG로 주고받습니다. 이미지 입력이 필요한 곳에서는 "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/(도메인별 파일 하나씩).
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