diff options
| author | Dhravya Shah <[email protected]> | 2025-12-30 12:04:30 -0800 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2025-12-30 12:04:30 -0800 |
| commit | 4e422905a321f043753ab4803acf7399c50336b3 (patch) | |
| tree | 740ae5e253beda9f9d99acc5a8c08910f0251bf2 | |
| parent | feat: supermemory MCP 4.0 (#631) (diff) | |
| download | supermemory-4e422905a321f043753ab4803acf7399c50336b3.tar.xz supermemory-4e422905a321f043753ab4803acf7399c50336b3.zip | |
replace all old mcp references with new
| -rw-r--r-- | apps/web/app/onboarding/mcp-form.tsx | 4 | ||||
| -rw-r--r-- | apps/web/components/connect-ai-modal.tsx | 12 | ||||
| -rw-r--r-- | apps/web/components/views/mcp/index.tsx | 2 | ||||
| -rw-r--r-- | apps/web/components/views/mcp/installation-dialog-content.tsx | 75 |
4 files changed, 48 insertions, 45 deletions
diff --git a/apps/web/app/onboarding/mcp-form.tsx b/apps/web/app/onboarding/mcp-form.tsx index 161642c4..84ba0838 100644 --- a/apps/web/app/onboarding/mcp-form.tsx +++ b/apps/web/app/onboarding/mcp-form.tsx @@ -165,14 +165,14 @@ export function MCPForm() { <p className="text-white/80">Copy the installation command</p> <div className="bg-white/10 relative shadow-xs rounded-lg max-w-md text-balance py-4 px-5 align-middle justify-center"> <p className="text-white font-mono text-xs w-4/5 text-nowrap overflow-x-hidden text-ellipsis"> - npx -y install-mcp@latest https://api.supermemory.ai/mcp + npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client {client} --oauth=yes </p> <Button className="absolute right-2 top-[6px]" onClick={() => { navigator.clipboard.writeText( - `npx -y install-mcp@latest https://api.supermemory.ai/mcp --client ${client} --oauth=yes`, + `npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client ${client} --oauth=yes`, ) setIsCopied(true) setTimeout(() => { diff --git a/apps/web/components/connect-ai-modal.tsx b/apps/web/components/connect-ai-modal.tsx index 89184b0d..be261cf9 100644 --- a/apps/web/components/connect-ai-modal.tsx +++ b/apps/web/components/connect-ai-modal.tsx @@ -264,7 +264,7 @@ export function ConnectAIModal({ function generateInstallCommand() { if (!selectedClient) return "" - let command = `npx -y install-mcp@latest https://api.supermemory.ai/mcp --client ${selectedClient} --oauth=yes` + let command = `npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client ${selectedClient} --oauth=yes` if (selectedProject && selectedProject !== "none") { // Remove the "sm_project_" prefix from the containerTag @@ -542,13 +542,13 @@ export function ConnectAIModal({ <Input className="font-mono text-xs w-full pr-10" readOnly - value="https://api.supermemory.ai/mcp" + value="https://mcp.supermemory.ai/mcp" /> <Button className="absolute top-[-1px] right-0 cursor-pointer" onClick={() => { navigator.clipboard.writeText( - "https://api.supermemory.ai/mcp", + "https://mcp.supermemory.ai/mcp", ) analytics.mcpInstallCmdCopied() toast.success("Copied to clipboard!") @@ -577,7 +577,7 @@ export function ConnectAIModal({ {`{ "supermemory-mcp": { "command": "npx", - "args": ["-y", "mcp-remote", "https://api.supermemory.ai/mcp"], + "args": ["-y", "mcp-remote", "https://mcp.supermemory.ai/mcp"], "env": {}, "headers": { "Authorization": "Bearer ${manualApiKey || "your-api-key-here"}" @@ -592,7 +592,7 @@ export function ConnectAIModal({ const config = `{ "supermemory-mcp": { "command": "npx", - "args": ["-y", "mcp-remote", "https://api.supermemory.ai/mcp"], + "args": ["-y", "mcp-remote", "https://mcp.supermemory.ai/mcp"], "env": {}, "headers": { "Authorization": "Bearer ${manualApiKey || "your-api-key-here"}" @@ -736,7 +736,7 @@ export function ConnectAIModal({ <div className="p-1 bg-muted rounded-lg border border-border items-center flex px-2"> <CopyableCell className="font-mono text-xs text-primary" - value="https://api.supermemory.ai/mcp" + value="https://mcp.supermemory.ai/mcp" /> </div> </div> diff --git a/apps/web/components/views/mcp/index.tsx b/apps/web/components/views/mcp/index.tsx index e79c2716..2489074b 100644 --- a/apps/web/components/views/mcp/index.tsx +++ b/apps/web/components/views/mcp/index.tsx @@ -138,7 +138,7 @@ export function MCPView() { <div className="p-3 bg-white/5 rounded border border-white/10"> <CopyableCell className="font-mono text-sm text-blue-400" - value="https://api.supermemory.ai/mcp" + value="https://mcp.supermemory.ai/mcp" /> </div> <p className="text-xs text-white/50 mt-2"> diff --git a/apps/web/components/views/mcp/installation-dialog-content.tsx b/apps/web/components/views/mcp/installation-dialog-content.tsx index 4c04c6ac..2eb043c4 100644 --- a/apps/web/components/views/mcp/installation-dialog-content.tsx +++ b/apps/web/components/views/mcp/installation-dialog-content.tsx @@ -1,25 +1,25 @@ -import { Button } from "@ui/components/button"; +import { Button } from "@ui/components/button" import { DialogContent, DialogDescription, DialogHeader, DialogTitle, -} from "@ui/components/dialog"; -import { Input } from "@ui/components/input"; +} from "@ui/components/dialog" +import { Input } from "@ui/components/input" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@ui/components/select"; -import { Label } from "@ui/components/label"; -import { CopyIcon } from "lucide-react"; -import { useState } from "react"; -import { toast } from "sonner"; -import { analytics } from "@/lib/analytics"; -import { $fetch } from "@repo/lib/api"; -import { useQuery } from "@tanstack/react-query"; +} from "@ui/components/select" +import { Label } from "@ui/components/label" +import { CopyIcon } from "lucide-react" +import { useState } from "react" +import { toast } from "sonner" +import { analytics } from "@/lib/analytics" +import { $fetch } from "@repo/lib/api" +import { useQuery } from "@tanstack/react-query" const clients = { cursor: "Cursor", @@ -31,47 +31,47 @@ const clients = { enconvo: "Enconvo", "gemini-cli": "Gemini CLI", "claude-code": "Claude Code", -} as const; +} as const interface Project { - id: string; - name: string; - containerTag: string; - createdAt: string; - updatedAt: string; - isExperimental?: boolean; + id: string + name: string + containerTag: string + createdAt: string + updatedAt: string + isExperimental?: boolean } export function InstallationDialogContent() { - const [client, setClient] = useState<keyof typeof clients>("cursor"); - const [selectedProject, setSelectedProject] = useState<string | null>("none"); + const [client, setClient] = useState<keyof typeof clients>("cursor") + const [selectedProject, setSelectedProject] = useState<string | null>("none") // Fetch projects const { data: projects = [], isLoading: isLoadingProjects } = useQuery({ queryKey: ["projects"], queryFn: async () => { - const response = await $fetch("@get/projects"); + const response = await $fetch("@get/projects") if (response.error) { - throw new Error(response.error?.message || "Failed to load projects"); + throw new Error(response.error?.message || "Failed to load projects") } - return response.data?.projects || []; + return response.data?.projects || [] }, staleTime: 30 * 1000, - }); + }) // Generate installation command based on selected project function generateInstallCommand() { - let command = `npx -y install-mcp@latest https://api.supermemory.ai/mcp --client ${client} --oauth=yes`; + let command = `npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client ${client} --oauth=yes` if (selectedProject && selectedProject !== "none") { // Remove the "sm_project_" prefix from the containerTag - const projectId = selectedProject.replace(/^sm_project_/, ''); - command += ` --project ${projectId}`; + const projectId = selectedProject.replace(/^sm_project_/, "") + command += ` --project ${projectId}` } - return command; + return command } return ( @@ -79,8 +79,8 @@ export function InstallationDialogContent() { <DialogHeader> <DialogTitle>Install the supermemory MCP Server</DialogTitle> <DialogDescription> - Select the app and project you want to install supermemory MCP to, then run the - following command: + Select the app and project you want to install supermemory MCP to, + then run the following command: </DialogDescription> </DialogHeader> @@ -118,7 +118,10 @@ export function InstallationDialogContent() { <SelectItem value="none" className="text-white hover:bg-white/10"> Auto-select project </SelectItem> - <SelectItem value="sm_project_default" className="text-white hover:bg-white/10"> + <SelectItem + value="sm_project_default" + className="text-white hover:bg-white/10" + > Default Project </SelectItem> {projects @@ -149,14 +152,14 @@ export function InstallationDialogContent() { <Button onClick={() => { - const command = generateInstallCommand(); - navigator.clipboard.writeText(command); - analytics.mcpInstallCmdCopied(); - toast.success("Copied to clipboard!"); + const command = generateInstallCommand() + navigator.clipboard.writeText(command) + analytics.mcpInstallCmdCopied() + toast.success("Copied to clipboard!") }} > <CopyIcon className="size-4" /> Copy Installation Command </Button> </DialogContent> - ); + ) } |