Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: move Blender MCP setup out of Manage MCP servers into the composer (#12430)
Nilaya768954e01ae
diff --git a/studio/frontend/src/features/chat/blender-mcp-setup.tsx b/studio/frontend/src/features/chat/blender-mcp-setup.tsxindex e4713c665b4..ba005583447 100644--- a/studio/frontend/src/features/chat/blender-mcp-setup.tsx+++ b/studio/frontend/src/features/chat/blender-mcp-setup.tsx@@ -145,7 +145,7 @@ export function BlenderMcpSetup({ servers, disabled, onBusyChange }: {{!config?.is_enabled && <p className="text-sm leading-relaxed text-muted-foreground">Unsloth downloads and sets up MCP on first use. Internet is needed once; the Blender add-on is installed separately.</p>}- {duplicate && <p className="text-xs leading-relaxed text-amber-600">A custom Blender server also exists. Disable it below if you prefer Unsloth’s managed setup.</p>}+ {duplicate && <p className="text-xs leading-relaxed text-amber-600">A custom Blender server also exists. Disable it in Manage MCP servers if you prefer Unsloth’s managed setup.</p>}{config && !config.is_enabled && (<div className="flex items-start gap-3"><Checkbox id="blender-mcp-consent" className="mt-0.5" checked={consent} disabled={locked} onCheckedChange={(checked) => setConsent(checked === true)} />diff --git a/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx b/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsxindex af329434384..6e4bb9d9db2 100644--- a/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx+++ b/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx@@ -57,7 +57,6 @@ import {createMcpStdioSnapshot,resolveMcpStdioUrl,} from "./mcp-server-form";-import { BlenderMcpSetup } from "./blender-mcp-setup";import { RefreshGlyph } from "@/lib/refresh-icon";type HeaderRow = { id: string; key: string; value: string };@@ -359,7 +358,6 @@ export function ChatMcpServersDialog({}: ChatMcpServersDialogProps) {const [servers, setServers] = useState<McpServerConfig[]>([]);const [loading, setLoading] = useState(false);- const [blenderBusy, setBlenderBusy] = useState(false);const [view, setView] = useState<View>({ kind: "list" });const [form, setForm] = useState<FormState>(EMPTY_FORM);const [saving, setSaving] = useState(false);@@ -491,7 +489,6 @@ export function ChatMcpServersDialog({}async function startEdit(server: McpServerConfig) {- if (blenderBusy) return;const generation = formGenerationRef.current + 1;formGenerationRef.current = generation;activeEditIdRef.current = server.id;@@ -574,7 +571,7 @@ export function ChatMcpServersDialog({function handleOpenChange(next: boolean) {// once crud starts, dismissal must wait for the authoritative refresh- if (!next && (blenderBusy || (saving && !codecPending) || busyIdsRef.current.size > 0))+ if (!next && ((saving && !codecPending) || busyIdsRef.current.size > 0))return;if (!next) {formGenerationRef.current += 1;@@ -886,7 +883,7 @@ export function ChatMcpServersDialog({<Dialog open={open} onOpenChange={handleOpenChange}><DialogContentclassName="max-w-2xl max-h-[85dvh] overflow-y-auto"- showCloseButton={!blenderBusy && !(saving && !codecPending) && busyIds.size === 0}+ showCloseButton={!(saving && !codecPending) && busyIds.size === 0}aria-busy={decodingCommand}><DialogHeader>@@ -1100,19 +1097,18 @@ export function ChatMcpServersDialog({</div>) : (<div className="flex min-w-0 flex-col gap-3">- {open && <BlenderMcpSetup servers={servers} disabled={importing} onBusyChange={setBlenderBusy} />}<div className="flex justify-end gap-2"><Buttonsize="sm"variant="outline"onClick={() => fileInputRef.current?.click()}- disabled={importing || blenderBusy}+ disabled={importing}title="Import servers from a mcpServers JSON config (Claude Desktop, Cursor, VS Code…)">{importing ? <Spinner /> : <UploadIcon className="size-3.5" />}Import config</Button>- <Button size="sm" onClick={startCreate} disabled={importing || blenderBusy}>+ <Button size="sm" onClick={startCreate} disabled={importing}><HugeiconsIcon icon={PlusSignIcon} className="size-3.5" />Add server</Button>@@ -1168,7 +1164,7 @@ export function ChatMcpServersDialog({size="icon"onClick={() => void startEdit(server)}aria-label="Edit server"- disabled={importing || blenderBusy || busyIds.has(server.id)}+ disabled={importing || busyIds.has(server.id)}><HugeiconsIcon icon={Edit03Icon} className="size-3.5" /></Button>diff --git a/studio/frontend/src/features/chat/mcp-composer-button.tsx b/studio/frontend/src/features/chat/mcp-composer-button.tsxindex a6fe06c9abf..a470bf82731 100644--- a/studio/frontend/src/features/chat/mcp-composer-button.tsx+++ b/studio/frontend/src/features/chat/mcp-composer-button.tsx@@ -11,6 +11,13 @@ import {import { useCallback, useEffect, useRef, useState } from "react";import { toast } from "sonner";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,@@ -37,6 +44,7 @@ import {listMcpServers,updateMcpServer,} from "./api/mcp-servers-api";+import { BlenderMcpSetup } from "./blender-mcp-setup";import { ChatMcpServersDialog } from "./chat-mcp-servers-dialog";import { normalizeMcpUrl } from "./mcp-server-url";import { useChatActive } from "./runtime-provider";@@ -93,6 +101,8 @@ export function McpComposerButton({const dialogOpen = useMcpServersDialogStore((s) => s.open);const setDialogOpen = useMcpServersDialogStore((s) => s.setOpen);const [menuOpen, setMenuOpen] = useState(false);+ const [blenderOpen, setBlenderOpen] = useState(false);+ const [blenderBusy, setBlenderBusy] = useState(false);const [serversLoaded, setServersLoaded] = useState(false);const [pendingUrls, setPendingUrls] = useState<ReadonlySet<string>>(() => new Set(),@@ -402,7 +412,7 @@ export function McpComposerButton({<DropdownMenuItemonSelect={() => {setMenuOpen(false);- setDialogOpen(true);+ setBlenderOpen(true);}}className={blenderEnabled ? "relative text-primary font-medium" : "relative"}>@@ -433,6 +443,32 @@ export function McpComposerButton({</DropdownMenuItem></DropdownMenuContent></DropdownMenu>+ <Dialog+ open={blenderOpen}+ onOpenChange={(open) => {+ if (!open && blenderBusy) return;+ setBlenderOpen(open);+ }}+ >+ <DialogContent+ className="max-w-lg max-h-[85dvh] overflow-y-auto"+ showCloseButton={!blenderBusy}+ >+ <DialogHeader>+ <DialogTitle>Blender MCP</DialogTitle>+ <DialogDescription>+ Let the model control Blender through MCP.+ </DialogDescription>+ </DialogHeader>+ {blenderOpen && (+ <BlenderMcpSetup+ servers={servers}+ disabled={false}+ onBusyChange={setBlenderBusy}+ />+ )}+ </DialogContent>+ </Dialog></>);}diff --git a/studio/frontend/tests/mcp-server-arguments.test.ts b/studio/frontend/tests/mcp-server-arguments.test.tsindex 37e8123d36f..e54d5a72169 100644--- a/studio/frontend/tests/mcp-server-arguments.test.ts+++ b/studio/frontend/tests/mcp-server-arguments.test.ts@@ -289,7 +289,7 @@ test("dialog actions and reconciliation stop when the dialog closes", () => {);assert.match(CHAT_MCP_SERVERS_DIALOG,- /<Button size="sm" onClick=\{startCreate\} disabled=\{importing \|\| blenderBusy\}>/,+ /<Button size="sm" onClick=\{startCreate\} disabled=\{importing\}>/,);});@@ -325,12 +325,12 @@ test("dialog closure is blocked while a CRUD mutation is in flight", () => {assert.match(closeHandler,- /if \(!next && \(blenderBusy \|\| \(saving && !codecPending\) \|\| busyIdsRef\.current\.size > 0\)\)[\s\S]*return;[\s\S]*if \(!next\) \{[\s\S]*formGenerationRef\.current \+= 1;/,+ /if \(!next && \(\(saving && !codecPending\) \|\| busyIdsRef\.current\.size > 0\)\)[\s\S]*return;[\s\S]*if \(!next\) \{[\s\S]*formGenerationRef\.current \+= 1;/,"the in-flight mutation guard must run before close invalidates the form generation",);assert.match(CHAT_MCP_SERVERS_DIALOG,- /<DialogContent[\s\S]*?showCloseButton=\{!blenderBusy && !\(saving && !codecPending\) && busyIds\.size === 0\}[\s\S]*?>/,+ /<DialogContent[\s\S]*?showCloseButton=\{!\(saving && !codecPending\) && busyIds\.size === 0\}[\s\S]*?>/,"the built-in close control must disappear during the same mutation window",);assert.match(