"use client"; /* Connect (MCP) screen - expose this project's tools as an MCP server for external clients. (Consuming external MCP servers lives in the BUILD → External MCP tab.) */ import { ReactNode, useCallback, useEffect, useState } from "react"; import { Icon } from "../icons"; import { CodeBlock, Field, Segmented, Toggle } from "../primitives"; import { api, type McpToken, type MyConnection, type ToolSet } from "@/lib/api"; import { EmbedPanel } from "./embed"; /* Collapsible detail section - keeps the deep integration reference tucked away so the Connect screen stays scannable; expand only what you need. */ function Collapse({ title, sub, defaultOpen = false, children }: { title: string; sub?: string; defaultOpen?: boolean; children: ReactNode }) { const [open, setOpen] = useState(defaultOpen); return (