mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
* feat: MCP URL builder - Creates an MCP URL builder component that allows a user to choose options via a UI, then automatically builds the URL and config needed for various MCP clients - Adds this component to studio Config modal and docs MCP page * fix(mcp url builder): mcp-remote options mcp-remote handles OAuth, so no need to pass personal access token * fix(docs): mcp We are pushing the remote MCP server rather than the local one, so removing references to the local server from documentation. * fix(mcp url builder): ui messages - Clarify read-only mode - Storage is not enabled in the defautl configuration * fix: mcp url builder - Refactor unnecessary hook into a utility function - Fix background color in dark mode * feat: update remote MCP base URL * docs: update MCP getting started - Restores relevant content from prod - Adds callout about authentication - Adds next steps to remote MCP installation section * Update apps/docs/content/guides/getting-started/mcp.mdx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat: click selected project to unselect This follows the unselect pattern from shadcn combobox example https://ui.shadcn.com/docs/components/combobox * Update apps/docs/content/guides/getting-started/mcp.mdx Co-authored-by: Greg Richardson <greg.nmr@gmail.com> * Update apps/docs/content/guides/getting-started/mcp.mdx Co-authored-by: Greg Richardson <greg.nmr@gmail.com> * Update apps/docs/content/guides/getting-started/mcp.mdx Co-authored-by: Greg Richardson <greg.nmr@gmail.com> * fix: light mode connection icons * chore: format `mcp.mdx` * fix: VS Code URL handler "name" Based on docs the field is "name" instead of "id": - https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_commandline-configuration - https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_url-handler * refactor: `NEXT_PUBLIC_MCP_URL` environment variable * feat: move client selector below options * feat: "Add to" buttons left aligned about config file * feat: actionable login hint * refactor: remote claude desktop client option --------- Co-authored-by: Matt Rossman <22670878+mattrossman@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Greg Richardson <greg.nmr@gmail.com> Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
359 lines
8.0 KiB
TypeScript
359 lines
8.0 KiB
TypeScript
import { DOCS_URL } from 'lib/constants'
|
|
import { CodeBlockLang } from 'ui'
|
|
|
|
export type DatabaseConnectionType =
|
|
| 'uri'
|
|
| 'psql'
|
|
| 'golang'
|
|
| 'jdbc'
|
|
| 'dotnet'
|
|
| 'nodejs'
|
|
| 'php'
|
|
| 'python'
|
|
| 'sqlalchemy'
|
|
|
|
export const DATABASE_CONNECTION_TYPES: {
|
|
id: DatabaseConnectionType
|
|
label: string
|
|
contentType: 'input' | 'code'
|
|
lang: CodeBlockLang
|
|
fileTitle: string | undefined
|
|
}[] = [
|
|
{ id: 'uri', label: 'URI', contentType: 'input', lang: 'bash', fileTitle: undefined },
|
|
{ id: 'psql', label: 'PSQL', contentType: 'code', lang: 'bash', fileTitle: undefined },
|
|
{ id: 'golang', label: 'Golang', contentType: 'code', lang: 'go', fileTitle: '.env' },
|
|
{ id: 'jdbc', label: 'JDBC', contentType: 'input', lang: 'bash', fileTitle: undefined },
|
|
{
|
|
id: 'dotnet',
|
|
label: '.NET',
|
|
contentType: 'code',
|
|
lang: 'csharp',
|
|
fileTitle: 'appsettings.json',
|
|
},
|
|
{ id: 'nodejs', label: 'Node.js', contentType: 'code', lang: 'js', fileTitle: '.env' },
|
|
{ id: 'php', label: 'PHP', contentType: 'code', lang: 'php', fileTitle: '.env' },
|
|
{ id: 'python', label: 'Python', contentType: 'code', lang: 'python', fileTitle: '.env' },
|
|
{ id: 'sqlalchemy', label: 'SQLAlchemy', contentType: 'code', lang: 'python', fileTitle: '.env' },
|
|
]
|
|
|
|
export const CONNECTION_PARAMETERS = {
|
|
host: {
|
|
key: 'host',
|
|
description: 'The hostname of your database',
|
|
},
|
|
port: {
|
|
key: 'port',
|
|
description: 'Port number for the connection',
|
|
},
|
|
database: {
|
|
key: 'database',
|
|
description: 'Default database name',
|
|
},
|
|
user: {
|
|
key: 'user',
|
|
description: 'Database user',
|
|
},
|
|
pool_mode: {
|
|
key: 'pool_mode',
|
|
description: 'Connection pooling behavior',
|
|
},
|
|
} as const
|
|
|
|
export type ConnectionType = {
|
|
key: string
|
|
icon: string
|
|
label: string
|
|
guideLink?: string
|
|
children: ConnectionType[]
|
|
files?: {
|
|
name: string
|
|
content: string
|
|
}[]
|
|
}
|
|
|
|
export const FRAMEWORKS: ConnectionType[] = [
|
|
{
|
|
key: 'nextjs',
|
|
label: 'Next.js',
|
|
icon: 'nextjs',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/nextjs`,
|
|
children: [
|
|
{
|
|
key: 'app',
|
|
label: 'App Router',
|
|
icon: '',
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'supabase-js',
|
|
icon: 'supabase',
|
|
children: [],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'pages',
|
|
label: 'Pages Router',
|
|
icon: '',
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'remix',
|
|
label: 'Remix',
|
|
icon: 'remix',
|
|
guideLink: `${DOCS_URL}/guides/auth/server-side/creating-a-client?framework=remix&environment=remix-loader`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'react',
|
|
label: 'React',
|
|
icon: 'react',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/reactjs`,
|
|
children: [
|
|
{
|
|
key: 'create-react-app',
|
|
label: 'Create React App',
|
|
icon: 'react',
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'supabase-js',
|
|
icon: 'supabase',
|
|
children: [],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'vite',
|
|
label: 'Vite',
|
|
icon: 'vite',
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'nuxt',
|
|
label: 'Nuxt',
|
|
icon: 'nuxt',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/nuxtjs`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'vuejs',
|
|
label: 'Vue.JS',
|
|
icon: 'vuejs',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/vue`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
key: 'sveltekit',
|
|
label: 'SvelteKit',
|
|
icon: 'sveltekit',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/sveltekit`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'solidjs',
|
|
label: 'Solid.js',
|
|
icon: 'solidjs',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/solidjs`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'astro',
|
|
label: 'Astro',
|
|
icon: 'astro',
|
|
guideLink: 'https://docs.astro.build/en/guides/backend/supabase/',
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'refine',
|
|
label: 'refine',
|
|
icon: 'refine',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/refine`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
|
|
export const MOBILES: ConnectionType[] = [
|
|
{
|
|
key: 'exporeactnative',
|
|
label: 'Expo React Native',
|
|
icon: 'expo',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-expo-react-native`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'flutter',
|
|
label: 'Flutter',
|
|
icon: 'flutter',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-flutter`,
|
|
children: [
|
|
{
|
|
key: 'supabaseflutter',
|
|
label: 'supabase-flutter',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'ionicreact',
|
|
label: 'Ionic React',
|
|
icon: 'react',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-ionic-react`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'swift',
|
|
label: 'Swift',
|
|
icon: 'swift',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-swift`,
|
|
children: [
|
|
{
|
|
key: 'supabaseswift',
|
|
label: 'supabase-swift',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'androidkotlin',
|
|
label: 'Android Kotlin',
|
|
icon: 'kotlin',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-kotlin`,
|
|
children: [
|
|
{
|
|
key: 'supabasekt',
|
|
label: 'supabase-kt',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'ionicangular',
|
|
label: 'Ionic Angular',
|
|
icon: 'ionic-angular',
|
|
guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-ionic-angular`,
|
|
children: [
|
|
{
|
|
key: 'supabasejs',
|
|
label: 'Supabase-js',
|
|
children: [],
|
|
icon: 'supabase',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
|
|
export const ORMS: ConnectionType[] = [
|
|
{
|
|
key: 'prisma',
|
|
label: 'Prisma',
|
|
icon: 'prisma',
|
|
guideLink: 'https://supabase.com/partners/integrations/prisma',
|
|
children: [],
|
|
},
|
|
{
|
|
key: 'drizzle',
|
|
label: 'Drizzle',
|
|
icon: 'drizzle',
|
|
guideLink: `${DOCS_URL}/guides/database/connecting-to-postgres#connecting-with-drizzle`,
|
|
children: [],
|
|
},
|
|
]
|
|
|
|
export const CONNECTION_TYPES = [
|
|
{ key: 'direct', label: 'Connection String', obj: [] },
|
|
{ key: 'frameworks', label: 'App Frameworks', obj: FRAMEWORKS },
|
|
{ key: 'mobiles', label: 'Mobile Frameworks', obj: MOBILES },
|
|
{ key: 'orms', label: 'ORMs', obj: ORMS },
|
|
{ key: 'mcp', label: 'MCP', obj: [] },
|
|
]
|
|
|
|
export const PGBOUNCER_ENABLED_BUT_NO_IPV4_ADDON_TEXT =
|
|
'Purchase IPv4 add-on or use Shared Pooler if on a IPv4 network'
|
|
export const IPV4_ADDON_TEXT = 'Connections are IPv4 proxied with IPv4 add-on'
|