"use client"; import { useMemo, useState } from "react"; import styles from "./AgentInstall.module.css"; const UNIVERSAL_JSON = `{ "mcpServers": { "agentmemory": { "command": "npx", "args": ["-y", "@agentmemory/mcp"], "env": { "AGENTMEMORY_URL": "http://localhost:3111" } } } }`; const CODEX_TOML = `[mcp_servers.agentmemory] command = "npx" args = ["-y", "@agentmemory/mcp"] [mcp_servers.agentmemory.env] AGENTMEMORY_URL = "http://localhost:3111"`; const OPENCODE_JSON = `{ "mcp": { "agentmemory": { "type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true, "environment": { "AGENTMEMORY_URL": "http://localhost:3111" } } } }`; const VSCODE_MCP_JSON = `{ "servers": { "agentmemory": { "type": "stdio", "command": "npx", "args": ["-y", "@agentmemory/mcp"], "env": { "AGENTMEMORY_URL": "http://localhost:3111" } } } }`; const CLAUDE_CODE_CMD = `claude mcp add agentmemory -- npx -y @agentmemory/mcp`; const COPILOT_CLI_CMD = `agentmemory connect copilot-cli`; const WARP_CMD = `agentmemory connect warp`; const HERMES_YAML = `plugins: - name: agentmemory path: agentmemory/integrations/hermes config: base_url: http://localhost:3111`; const OPENCLAW_YAML = `plugins: - id: agentmemory module: agentmemory/integrations/openclaw/plugin.mjs config: enabled: true base_url: http://localhost:3111`; function cursorDeeplink(): string { const cfg = { command: "npx", args: ["-y", "@agentmemory/mcp"], env: { AGENTMEMORY_URL: "http://localhost:3111" }, }; const base64 = typeof window !== "undefined" ? btoa(JSON.stringify(cfg)) : Buffer.from(JSON.stringify(cfg)).toString("base64"); return `cursor://anysphere.cursor-deeplink/mcp/install?name=agentmemory&config=${encodeURIComponent(base64)}`; } function vscodeDeeplink(): string { const cfg = { name: "agentmemory", command: "npx", args: ["-y", "@agentmemory/mcp"], env: { AGENTMEMORY_URL: "http://localhost:3111" }, }; const payload = typeof window !== "undefined" ? encodeURIComponent(JSON.stringify(cfg)) : encodeURIComponent(JSON.stringify(cfg)); return `vscode:mcp/install?${payload}`; } type ChipKind = "deeplink" | "copy"; interface Chip { id: string; label: string; kind: ChipKind; href?: string; copyText?: string; sub: string; } function CopyButton({ text, label = "COPY", small, }: { text: string; label?: string; small?: boolean; }) { const [copied, setCopied] = useState(false); const onClick = async () => { try { await navigator.clipboard.writeText(text); setCopied(true); setTimeout(() => setCopied(false), 1600); } catch { /* ignore */ } }; return ( ); } function Chip({ chip }: { chip: Chip }) { const [copied, setCopied] = useState(false); const inner = ( <> {chip.label} {chip.kind === "deeplink" ? "OPEN" : copied ? "COPIED ✓" : chip.sub} > ); if (chip.kind === "deeplink" && chip.href) { return ( {inner} ); } const onClick = async () => { if (!chip.copyText) return; try { await navigator.clipboard.writeText(chip.copyText); setCopied(true); setTimeout(() => setCopied(false), 1600); } catch { /* ignore */ } }; return ( ); } function Snippet({ title, body, hint, }: { title: string; body: string; hint: string; }) { return (
{body}
ONE MCP JSON FITS ALMOST EVERYTHING. PICK YOUR AGENT ON THE LEFT, OR PASTE THE UNIVERSAL CONFIG ON THE RIGHT.
CURSOR / VS CODE ARE ONE-CLICK VIA DEEPLINK. OTHERS COPY THE RIGHT SNIPPET DIRECTLY TO YOUR CLIPBOARD.