import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import type { McpRegistrationStatus } from "@/hooks/useMcpSetup"; import { CheckCircle2, Circle, Loader2, Plug } from "lucide-react"; import { useState } from "react"; type McpClientPanelProps = { backendReady: boolean; status: McpRegistrationStatus | null; busy: boolean; message: string; error: string; onRegister: (cursor: boolean, claude: boolean) => Promise; compact?: boolean; }; function StatusRow({ label, ok, detail, }: { label: string; ok: boolean; detail?: string | null; }) { return (

{label}

{detail ? (

{detail}

) : null}
{ok ? ( ) : ( )}
); } export function McpClientPanel({ backendReady, status, busy, message, error, onRegister, compact = false, }: McpClientPanelProps) { const [cursor, setCursor] = useState(true); const [claude, setClaude] = useState(true); return ( MCP clients (Cursor / Claude) The operator app spawns the MCP server on{" "} 127.0.0.1:10789. Register that URL in your AI IDE so it can call pywinauto tools while this app is running.
{backendReady ? "Backend ready" : "Backend starting…"} {status ? ( {status.mcpUrl} ) : null}
{status ? (
) : null} {!compact ? (
) : null}
{compact ? ( <> ) : null}
{message ?

{message}

: null} {error ?

{error}

: null}

Launch{" "} Pywinauto MCP Operator{" "} only. The Python MCP server is embedded inside the app and started automatically (cached under local app data, not a second shortcut).

); }