The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat(mcp): add Claude.ai and ChatGPT connectors with grouped client dropdown (#45524)
Pedro Rodriguesac8dab4283b4
diff --git a/packages/ui-patterns/src/McpUrlBuilder/McpConfigPanel.tsx b/packages/ui-patterns/src/McpUrlBuilder/McpConfigPanel.tsxindex 4bebc12c573..dfeb537ac2f 100644--- a/packages/ui-patterns/src/McpUrlBuilder/McpConfigPanel.tsx+++ b/packages/ui-patterns/src/McpUrlBuilder/McpConfigPanel.tsx@@ -8,10 +8,22 @@ import { InfoTooltip } from '../info-tooltip'import { ClientSelectDropdown } from './components/ClientSelectDropdown'import { McpConfigurationDisplay } from './components/McpConfigurationDisplay'import { McpConfigurationOptions } from './components/McpConfigurationOptions'-import { FEATURE_GROUPS_NON_PLATFORM, FEATURE_GROUPS_PLATFORM, MCP_CLIENTS } from './constants'+import {+ FEATURE_GROUPS_NON_PLATFORM,+ FEATURE_GROUPS_PLATFORM,+ MCP_CLIENT_GROUPS,+ MCP_CLIENTS,+} from './constants'import type { McpClient, McpOnCopyCallback } from './types'import { getMcpUrl } from './utils/getMcpUrl'+const CLIENT_GROUPS = MCP_CLIENT_GROUPS.map((group) => ({+ heading: group.heading,+ clients: group.keys+ .map((key) => MCP_CLIENTS.find((c) => c.key === key))+ .filter(Boolean) as (typeof MCP_CLIENTS)[number][],+}))+export interface McpConfigPanelProps {baseUrl?: stringprojectRef?: string@@ -105,6 +117,7 @@ export function McpConfigPanel({<ClientSelectDropdownlabel="Client"clients={MCP_CLIENTS}+ groups={CLIENT_GROUPS}selectedClient={selectedClient}onClientChange={handleClientChange}theme={theme}diff --git a/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx b/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsxindex f11e0beaff1..a2f0c220766 100644--- a/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx+++ b/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx@@ -19,10 +19,16 @@ import {import type { McpClient } from '../types'import { ConnectionIcon } from './ConnectionIcon'+export interface ClientGroup {+ heading: string+ clients: McpClient[]+}+interface ClientSelectDropdownProps {theme?: 'light' | 'dark'label?: stringclients: McpClient[]+ groups?: ClientGroup[]selectedClient: McpClientonClientChange: (clientKey: string) => void}@@ -31,6 +37,7 @@ export const ClientSelectDropdown = ({theme = 'light',label = 'Client',clients,+ groups,selectedClient,onClientChange,}: ClientSelectDropdownProps) => {@@ -41,6 +48,33 @@ export const ClientSelectDropdown = ({setOpen(false)}+ function renderClient(client: McpClient) {+ return (+ <CommandItem_Shadcn_+ key={client.key}+ value={client.key}+ onSelect={() => onSelectClient(client.key)}+ className="flex gap-2 items-center"+ >+ {client.icon ? (+ <ConnectionIcon+ connection={client.icon}+ theme={theme}+ hasDistinctDarkIcon={client.hasDistinctDarkIcon}+ />+ ) : (+ <Bot size={12} aria-hidden={true} />+ )}+ {client.label}+ <Check+ aria-label={client.key === selectedClient.key ? 'selected' : undefined}+ size={15}+ className={cn('ml-auto', client.key === selectedClient.key ? 'opacity-100' : 'opacity-0')}+ />+ </CommandItem_Shadcn_>+ )+ }+return (<Popover_Shadcn_ open={open} onOpenChange={setOpen} modal={false}><div className="flex">@@ -79,38 +113,15 @@ export const ClientSelectDropdown = ({<CommandInput_Shadcn_ placeholder="Search..." /><CommandList_Shadcn_><CommandEmpty_Shadcn_>No results found.</CommandEmpty_Shadcn_>- <CommandGroup_Shadcn_>- {clients.map((client) => (- <CommandItem_Shadcn_- key={client.key}- value={client.key}- onSelect={() => {- onSelectClient(client.key)- setOpen(false)- }}- className="flex gap-2 items-center"- >- {client.icon ? (- <ConnectionIcon- connection={client.icon}- theme={theme}- hasDistinctDarkIcon={client.hasDistinctDarkIcon}- />- ) : (- <Bot size={12} aria-hidden={true} />- )}- {client.label}- <Check- aria-label={client.key === selectedClient.key ? 'selected' : undefined}- size={15}- className={cn(- 'ml-auto',- client.key === selectedClient.key ? 'opacity-100' : 'opacity-0'- )}- />- </CommandItem_Shadcn_>- ))}- </CommandGroup_Shadcn_>+ {groups ? (+ groups.map((group) => (+ <CommandGroup_Shadcn_ key={group.heading} heading={group.heading}>+ {group.clients.map(renderClient)}+ </CommandGroup_Shadcn_>+ ))+ ) : (+ <CommandGroup_Shadcn_>{clients.map(renderClient)}</CommandGroup_Shadcn_>+ )}</CommandList_Shadcn_></Command_Shadcn_></PopoverContent_Shadcn_>diff --git a/packages/ui-patterns/src/McpUrlBuilder/constants.tsx b/packages/ui-patterns/src/McpUrlBuilder/constants.tsxindex 7aadf7137dc..8620967e029 100644--- a/packages/ui-patterns/src/McpUrlBuilder/constants.tsx+++ b/packages/ui-patterns/src/McpUrlBuilder/constants.tsx@@ -66,22 +66,6 @@ export const FEATURE_GROUPS_NON_PLATFORM = FEATURE_GROUPS_PLATFORM.filter((group/** Only set hasDistinctDarkIcon: true when the client has a separate -icon-dark.svg that looks different. Otherwise the same -icon.svg is used for both themes. */export const MCP_CLIENTS: McpClient[] = [- {- key: 'cursor',- label: 'Cursor',- icon: 'cursor',- configFile: '.cursor/mcp.json',- externalDocsUrl: 'https://docs.cursor.com/context/mcp',- generateDeepLink: (config) => {- const name = 'supabase'- const mcpUrl = getMcpUrl(config)- const serverConfig = {- url: mcpUrl,- }- const base64Config = Buffer.from(JSON.stringify(serverConfig)).toString('base64')- return `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encodeURIComponent(base64Config)}`- },- },{key: 'claude-code',label: 'Claude Code',@@ -137,6 +121,22 @@ export const MCP_CLIENTS: McpClient[] = [</div>),},+ {+ key: 'cursor',+ label: 'Cursor',+ icon: 'cursor',+ configFile: '.cursor/mcp.json',+ externalDocsUrl: 'https://docs.cursor.com/context/mcp',+ generateDeepLink: (config) => {+ const name = 'supabase'+ const mcpUrl = getMcpUrl(config)+ const serverConfig = {+ url: mcpUrl,+ }+ const base64Config = Buffer.from(JSON.stringify(serverConfig)).toString('base64')+ return `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encodeURIComponent(base64Config)}`+ },+ },{key: 'vscode',label: 'VS Code',@@ -554,7 +554,39 @@ export const MCP_CLIENTS: McpClient[] = [</>),},+ {+ key: 'claude-ai',+ label: 'Claude.ai',+ icon: 'claude',+ externalDocsUrl: 'https://claude.com/docs/connectors/overview',+ generateDeepLink: () =>+ 'https://claude.ai/directory/connectors/11ca66fc-1e98-49d5-ab9b-7cb4672a8f10',+ },+ {+ key: 'chatgpt',+ label: 'ChatGPT',+ icon: 'openai',+ hasDistinctDarkIcon: true,+ externalDocsUrl: 'https://chatgpt.com/features/apps/',+ generateDeepLink: () =>+ 'https://chatgpt.com/apps/supabase/asdk_app_69d3e5ee6a708191baa733f7b8931995',+ },]+export const MCP_CLIENT_GROUPS = [+ {+ heading: 'AI Agent CLI',+ keys: ['claude-code', 'codex', 'gemini-cli', 'opencode', 'factory'],+ },+ {+ heading: 'Web Clients',+ keys: ['claude-ai', 'chatgpt', 'goose'],+ },+ {+ heading: 'IDE',+ keys: ['cursor', 'vscode', 'antigravity', 'kiro', 'windsurf'],+ },+] as const+export const DEFAULT_MCP_URL_PLATFORM = 'http://localhost:8080/mcp'export const DEFAULT_MCP_URL_NON_PLATFORM = 'http://localhost:54321/mcp'diff --git a/packages/ui-patterns/src/McpUrlBuilder/index.ts b/packages/ui-patterns/src/McpUrlBuilder/index.tsindex 0e4d8e6bc90..e102b669d18 100644--- a/packages/ui-patterns/src/McpUrlBuilder/index.ts+++ b/packages/ui-patterns/src/McpUrlBuilder/index.ts@@ -1,4 +1,4 @@-export { ClientSelectDropdown } from './components/ClientSelectDropdown'+export { ClientSelectDropdown, type ClientGroup } from './components/ClientSelectDropdown'export { ConnectionIcon } from './components/ConnectionIcon'export { McpConfigurationDisplay } from './components/McpConfigurationDisplay'export { McpConfigurationOptions } from './components/McpConfigurationOptions'@@ -8,6 +8,7 @@ export {FEATURE_GROUPS_PLATFORM,FEATURE_GROUPS_NON_PLATFORM,MCP_CLIENTS,+ MCP_CLIENT_GROUPS,} from './constants'export { getMcpUrl } from './utils/getMcpUrl'export { createMcpCopyHandler, type McpCopyType } from './utils/createMcpCopyHandler'