Home / Function/ McpTabContentInnerLoaded() — supabase Function Reference

McpTabContentInnerLoaded() — supabase Function Reference

Architecture documentation for the McpTabContentInnerLoaded() function in McpTabContent.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/Connect/McpTabContent.tsx lines 34–77

const McpTabContentInnerLoaded = ({
  projectRef,
  projectKeys,
}: {
  projectRef: string
  projectKeys: projectKeys
}) => {
  const { resolvedTheme } = useTheme()
  const track = useTrack()
  const [selectedClient, setSelectedClient] = useState<McpClient | null>(null)

  const handleCopy = useMemo(
    () =>
      createMcpCopyHandler({
        selectedClient,
        source: 'studio',
        onTrack: (event) => track(event.action, event.properties, event.groups),
        projectRef,
      }),
    [selectedClient, track, projectRef]
  )

  const handleInstall = () => {
    if (selectedClient?.label) {
      track('mcp_install_button_clicked', {
        client: selectedClient.label,
        source: 'studio',
      })
    }
  }

  return (
    <McpConfigPanel
      basePath={BASE_PATH}
      projectRef={projectRef}
      theme={resolvedTheme as 'light' | 'dark'}
      isPlatform={IS_PLATFORM}
      apiUrl={projectKeys.apiUrl ?? undefined}
      onCopyCallback={handleCopy}
      onInstallCallback={handleInstall}
      onClientSelect={setSelectedClient}
    />
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free