import { Link } from "@tanstack/react-router"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { CopyButton } from "@/client/features/ai-mcp/SetupControls"; import { captureClientEvent } from "@/client/lib/posthog"; import type { DashboardActivation } from "@/server/features/dashboard/services/DashboardService"; import { dismissDashboardMcpCard } from "@/serverFunctions/dashboard"; function firstPrompts(domain: string | null): string[] { const site = domain ?? "my site"; return [ `Review ${site}. Ideas for what keywords we could target? Use OpenSEO`, "Research my competitors top pages and keywords and tell me what's working. Use OpenSEO", ]; } /** * The MCP activation card. Pitches the agent workflow and links to the * AI & MCP page for setup; disappears for good after the org's first * external tool call (or an explicit "I already connected"). */ export function McpConnectCard({ projectId, activation, }: { projectId: string; activation: DashboardActivation; }) { const queryClient = useQueryClient(); const dismissMutation = useMutation({ mutationFn: () => dismissDashboardMcpCard({ data: { projectId } }), onSuccess: () => void queryClient.invalidateQueries({ queryKey: ["dashboardActivation", projectId], }), }); if (activation.mcp.firstToolCallAt || activation.mcp.cardDismissedAt) { return null; } const connected = activation.mcp.authorizedAt !== null; return (
Your agent is connected. Try asking it:
Waiting for your first call — this card disappears once your agent talks to OpenSEO.
> ) : ( <>OpenSEO is designed to give your AI agent the data it needs to build a great SEO strategy and help you execute it.
This way you aren’t limited on “AI credits”.
You can work with your agent to figure out what automations make sense for you and it can help you write content too.