diff --git a/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx b/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx index 93c4c8972c..c706d971ac 100644 --- a/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx +++ b/studio/frontend/src/features/chat/chat-mcp-servers-dialog.tsx @@ -178,8 +178,6 @@ function HeadersEditor({ export interface ChatMcpServersDialogProps { open: boolean; onOpenChange: (open: boolean) => void; - /** Open straight into the "add server" form instead of the list view. */ - openToCreate?: boolean; } type View = @@ -190,7 +188,6 @@ type View = export function ChatMcpServersDialog({ open, onOpenChange, - openToCreate = false, }: ChatMcpServersDialogProps) { const [servers, setServers] = useState([]); const [loading, setLoading] = useState(false); @@ -217,12 +214,10 @@ export function ChatMcpServersDialog({ useEffect(() => { if (!open) return; refresh(); - // Land on the create form when opened via "Add custom MCP". - if (openToCreate) { - setView({ kind: "create" }); - setForm(EMPTY_FORM); - } - }, [open, openToCreate, refresh]); + // Reset to the list on each open, else a stale create/edit view persists. + setView({ kind: "list" }); + setForm(EMPTY_FORM); + }, [open, refresh]); function startCreate() { setView({ kind: "create" }); diff --git a/studio/frontend/src/features/chat/mcp-composer-button.tsx b/studio/frontend/src/features/chat/mcp-composer-button.tsx index 92d2c319a6..1e59960d07 100644 --- a/studio/frontend/src/features/chat/mcp-composer-button.tsx +++ b/studio/frontend/src/features/chat/mcp-composer-button.tsx @@ -57,7 +57,7 @@ type McpPreset = { }; // Keyless remote MCP presets (rate-limited free tiers, no API key). -// Hugging Face runs anonymously; add a token via "Add custom MCP". +// Hugging Face runs anonymously; add a token via "Manage MCP servers". const MCP_PRESETS: readonly McpPreset[] = [ { id: "context7", @@ -296,7 +296,7 @@ export function McpComposerButton({ setDialogOpen(true); }} > - Add custom MCP + Manage MCP servers @@ -331,7 +331,6 @@ export function McpComposerButton({ // Resync after managing servers. if (!next) void refresh(); }} - openToCreate={true} /> );