From 8d31a10cc763129b985d57562f0b39443979da6a Mon Sep 17 00:00:00 2001 From: Definitionist Date: Mon, 30 Mar 2026 11:00:51 -0700 Subject: [PATCH] =?UTF-8?q?Add=20LM=20Studio=20=E2=86=94=20SD=20WebUI=20in?= =?UTF-8?q?tegration=20and=20dev=20server=20configs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - webui-api.bat: wrapper that starts SD WebUI with --api --listen (required for LM Studio MCP sd-webui server to connect to http://127.0.0.1:7860) - .lmstudio/mcp.json: updated SD_OUTPUT_DIR to SD's own outputs/txt2img-images folder - .claude/launch.json: dev server registry for all local projects (SD, Flask, FastAPI, Vite apps); corrected SD entry to use webui-api.bat instead of wrong python webui.py entrypoint Co-Authored-By: Claude Sonnet 4.6 --- Users/Shadow/.claude/launch.json | 48 ++++++++++++++++ Users/Shadow/.lmstudio/mcp.json | 55 +++++++++++++++++++ .../webui-api.bat | 6 ++ 3 files changed, 109 insertions(+) create mode 100644 Users/Shadow/.claude/launch.json create mode 100644 Users/Shadow/.lmstudio/mcp.json create mode 100644 Users/Shadow/stable-diffusion-webui-master/webui-api.bat diff --git a/Users/Shadow/.claude/launch.json b/Users/Shadow/.claude/launch.json new file mode 100644 index 0000000..c863f8c --- /dev/null +++ b/Users/Shadow/.claude/launch.json @@ -0,0 +1,48 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "PeojectWebsite (Vite/React)", + "cwd": "C:/Users/Shadow/PeojectWebsite", + "runtimeExecutable": "npm", + "runtimeArgs": ["run", "dev"], + "port": 3000 + }, + { + "name": "word-to-markdown (Vite/React)", + "cwd": "C:/Users/Shadow/word-to-markdown", + "runtimeExecutable": "npm", + "runtimeArgs": ["run", "dev"], + "port": 3000 + }, + { + "name": "stable-diffusion-webui (Gradio + API)", + "cwd": "C:/Users/Shadow/stable-diffusion-webui-master", + "runtimeExecutable": "cmd", + "runtimeArgs": ["/c", "webui-api.bat"], + "port": 7860, + "note": "Starts with --api --listen. LM Studio MCP connects to http://127.0.0.1:7860" + }, + { + "name": "safe-agent-bridge (HTTP)", + "cwd": "C:/Users/Shadow/safe-agent-bridge", + "runtimeExecutable": "python", + "runtimeArgs": ["server.py"], + "port": 7777 + }, + { + "name": "Archive-Agent (FastAPI/uvicorn)", + "cwd": "C:/Users/Shadow/Archive-Agent", + "runtimeExecutable": "python", + "runtimeArgs": ["-m", "archive_agent"], + "port": 8000 + }, + { + "name": "Xandai-CLI (Flask)", + "cwd": "C:/Users/Shadow/Xandai-CLI", + "runtimeExecutable": "python", + "runtimeArgs": ["app.py"], + "port": 5000 + } + ] +} diff --git a/Users/Shadow/.lmstudio/mcp.json b/Users/Shadow/.lmstudio/mcp.json new file mode 100644 index 0000000..6735a37 --- /dev/null +++ b/Users/Shadow/.lmstudio/mcp.json @@ -0,0 +1,55 @@ +{ + "mcpServers": { + "sd-webui": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\sd-webui\\server.js" + ], + "env": { + "SD_WEBUI_URL": "http://127.0.0.1:7860", + "SD_OUTPUT_DIR": "C:\\Users\\Shadow\\stable-diffusion-webui-master\\outputs\\txt2img-images" + } + }, + "filesystem": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\filesystem\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", + "C:\\Users\\Shadow", + "C:\\Users\\Shadow\\Downloads", + "C:\\Users\\Shadow\\Documents", + "C:\\Users\\Shadow\\Desktop", + "C:\\Users\\Shadow\\stable-diffusion-webui-master" + ] + }, + "memory": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\memory\\node_modules\\@modelcontextprotocol\\server-memory\\dist\\index.js" + ] + }, + "playwright": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\playwright\\node_modules\\@playwright\\mcp\\cli.js" + ] + }, + "fetch": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\fetch\\node_modules\\mcp-fetch-server\\dist\\index.js" + ] + }, + "github": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\github\\node_modules\\@modelcontextprotocol\\server-github\\dist\\index.js" + ] + }, + "sequential-thinking": { + "command": "node", + "args": [ + "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\sequential-thinking\\node_modules\\@modelcontextprotocol\\server-sequential-thinking\\dist\\index.js" + ] + } + } +} diff --git a/Users/Shadow/stable-diffusion-webui-master/webui-api.bat b/Users/Shadow/stable-diffusion-webui-master/webui-api.bat new file mode 100644 index 0000000..3777bd2 --- /dev/null +++ b/Users/Shadow/stable-diffusion-webui-master/webui-api.bat @@ -0,0 +1,6 @@ +@echo off +rem Starts SD WebUI with API enabled — required for LM Studio MCP integration +rem Access WebUI at http://127.0.0.1:7860 +rem API docs at http://127.0.0.1:7860/docs + +call webui.bat --api --listen