McpDiscoveredServers

Ask the user to approve MCP servers that a project configuration adds, before any of them runs. Pass only servers the user has not decided on yet; with an empty list nothing renders, so remove servers from the list once the decision is saved. All servers are selected by default (defaultSelectedIds changes that). onApprove receives the selected servers; onReject receives every listed server and the Reject button appears only when it is set. Both buttons show a loader while the promise is pending, and a rejection is shown in a dismissible alert. The card works in a 360px widget and on a settings page.

Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react
Examples
Wide
Narrow
Saving fails
API reference
Prop
Type
Required
servers
McpDiscoveredServer[]
Yes
Servers found in project configuration that the user has not approved or rejected yet; nothing renders when empty
onApprove
(servers: McpDiscoveredServer[]) => void | Promise<void>
Yes
Called with the selected servers; the buttons show a loader until the promise settles
onReject
(servers: McpDiscoveredServer[]) => void | Promise<void>
No
Called with all listed servers, selected or not, to dismiss the prompt; the Reject button is hidden when omitted
defaultSelectedIds
string[]
No
Ids selected initially, all servers by default; servers added to the list later start selected
labels
Partial<McpDiscoveredServersLabels>
No
Button and message overrides
className
string
No
Class name added to the root element
style
React.CSSProperties
No
Inline styles added to the root element