"use client" import { Select, SelectValue, SelectTrigger, SelectContent, SelectItem, } from "@ui/components/select" import { useOnboarding } from "./onboarding-context" import { useEffect, useState } from "react" import { Button } from "@ui/components/button" import { CheckIcon, CircleCheckIcon, CopyIcon, LoaderIcon } from "lucide-react" import { TextMorph } from "@/components/text-morph" import { NavMenu } from "./nav-menu" import { cn } from "@lib/utils" import { motion, AnimatePresence } from "motion/react" import { useQuery } from "@tanstack/react-query" import { $fetch } from "@lib/api" const clients = { cursor: "Cursor", claude: "Claude Desktop", vscode: "VSCode", cline: "Cline", "roo-cline": "Roo Cline", witsy: "Witsy", enconvo: "Enconvo", "gemini-cli": "Gemini CLI", "claude-code": "Claude Code", } as const export function MCPForm() { const { totalSteps, nextStep, getStepNumberFor } = useOnboarding() const [client, setClient] = useState("cursor") const [isCopied, setIsCopied] = useState(false) const [isInstalling, setIsInstalling] = useState(true) const hasLoginQuery = useQuery({ queryKey: ["mcp", "has-login"], queryFn: async (): Promise<{ previousLogin: boolean }> => { const response = await $fetch("@get/mcp/has-login") if (response.error) { throw new Error(response.error?.message || "Failed to check MCP login") } return response.data as { previousLogin: boolean } }, enabled: isInstalling, refetchInterval: isInstalling ? 1000 : false, staleTime: 0, }) useEffect(() => { if (hasLoginQuery.data?.previousLogin) { setIsInstalling(false) } }, [hasLoginQuery.data?.previousLogin]) return (
{!isInstalling ? ( ) : ( )}

Step {getStepNumberFor("mcp")} of {totalSteps}

Install the MCP server

Bring Supermemory to all your favourite tools

1

Select the app you want to install Supermemory MCP to

2

Copy the installation command

npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client {client} --oauth=yes

3

Run the command in your terminal of choice

{isInstalling ? ( ) : ( )} {isInstalling ? "Waiting for installation..." : "Installation complete!"}
) }