-
Notifications
You must be signed in to change notification settings - Fork 0
Add LM Studio ↔ SD WebUI MCP integration and dev server configs #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,48 @@ | ||||||||||
| { | ||||||||||
| "version": "0.0.1", | ||||||||||
| "configurations": [ | ||||||||||
| { | ||||||||||
| "name": "PeojectWebsite (Vite/React)", | ||||||||||
| "cwd": "C:/Users/Shadow/PeojectWebsite", | ||||||||||
|
Comment on lines
+5
to
+6
|
||||||||||
| "name": "PeojectWebsite (Vite/React)", | |
| "cwd": "C:/Users/Shadow/PeojectWebsite", | |
| "name": "ProjectWebsite (Vite/React)", | |
| "cwd": "C:/Users/Shadow/ProjectWebsite", |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -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" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+23
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "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" | |
| ] | |
| }, | |
| "filesystem": { | |
| "command": "node", | |
| "args": [ | |
| "C:\\Users\\Shadow\\.lmstudio\\mcp-servers\\filesystem\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", | |
| "C:\\Users\\Shadow\\stable-diffusion-webui-master", | |
| "C:\\Users\\Shadow\\stable-diffusion-webui-master\\outputs\\txt2img-images", | |
| "C:\\Users\\Shadow\\.lmstudio\\mcp-workspace" | |
| ] | |
| }, |
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This config hard-codes machine-specific absolute paths (including a specific Windows username) for both the MCP server entrypoint and SD_OUTPUT_DIR. If this repo is intended to be used on other machines, consider parameterizing these via environment variables (e.g., %USERPROFILE%) or checking in a template file and keeping the real mcp.json untracked.
| "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" | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\sd-webui\\server.js" | |
| ], | |
| "env": { | |
| "SD_WEBUI_URL": "http://127.0.0.1:7860", | |
| "SD_OUTPUT_DIR": "%USERPROFILE%\\stable-diffusion-webui-master\\outputs\\txt2img-images" | |
| } | |
| }, | |
| "filesystem": { | |
| "command": "node", | |
| "args": [ | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\filesystem\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", | |
| "%USERPROFILE%", | |
| "%USERPROFILE%\\Downloads", | |
| "%USERPROFILE%\\Documents", | |
| "%USERPROFILE%\\Desktop", | |
| "%USERPROFILE%\\stable-diffusion-webui-master" | |
| ] | |
| }, | |
| "memory": { | |
| "command": "node", | |
| "args": [ | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\memory\\node_modules\\@modelcontextprotocol\\server-memory\\dist\\index.js" | |
| ] | |
| }, | |
| "playwright": { | |
| "command": "node", | |
| "args": [ | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\playwright\\node_modules\\@playwright\\mcp\\cli.js" | |
| ] | |
| }, | |
| "fetch": { | |
| "command": "node", | |
| "args": [ | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\fetch\\node_modules\\mcp-fetch-server\\dist\\index.js" | |
| ] | |
| }, | |
| "github": { | |
| "command": "node", | |
| "args": [ | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\github\\node_modules\\@modelcontextprotocol\\server-github\\dist\\index.js" | |
| ] | |
| }, | |
| "sequential-thinking": { | |
| "command": "node", | |
| "args": [ | |
| "%USERPROFILE%\\.lmstudio\\mcp-servers\\sequential-thinking\\node_modules\\@modelcontextprotocol\\server-sequential-thinking\\dist\\index.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration file contains multiple hardcoded absolute paths that include a specific username (C:\\Users\\Shadow\\...). This makes the configuration not portable for other developers. It's highly recommended to avoid user-specific absolute paths in version-controlled files. Consider using paths relative to a known location, or a mechanism that allows user-specific overrides (e.g., via environment variables). For example, the application consuming this file could be made to expand an environment variable like %USERPROFILE% on Windows.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -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 | ||||||||||||||||||
|
Comment on lines
+5
to
+6
|
||||||||||||||||||
| call webui.bat --api --listen | |
| rem Note: `--listen` is omitted to keep the WebUI/API bound to localhost only. | |
| rem If you intentionally want LAN access, add `--listen` to the command below. | |
| call webui.bat --api |
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call webui.bat ... depends on the current working directory. To make this wrapper resilient when launched from elsewhere (double-clicked, scheduled task, etc.), call webui.bat via %~dp0 (the script directory) and quote the path.
| call webui.bat --api --listen | |
| call "%~dp0webui.bat" --api --listen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a typo in
PeojectWebsite. Assuming it should beProjectWebsite.Additionally, the
cwdpath is hardcoded to a specific user's directory (C:/Users/Shadow/...). This makes the configuration not portable for other developers. This issue is present for all configurations in this file. It's highly recommended to use environment variables. For example, in VS Code'slaunch.json, you can use${env:USERPROFILE}which typically resolves toC:\Users\<username>on Windows.