replace all old mcp references with new

This commit is contained in:
Dhravya Shah 2025-12-30 12:04:30 -08:00
parent c6792e5100
commit 4e422905a3
4 changed files with 48 additions and 45 deletions

View file

@ -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(() => {

View file

@ -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>

View file

@ -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">

View file

@ -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>
);
)
}