The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio): remove admonition now that mcp supports scoped pat (#48931)
kemal.earth1cc0682c47a6
diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenForm.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenForm.tsxindex 4c1845d97a3..25f572efe1b 100644--- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenForm.tsx+++ b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenForm.tsx@@ -178,10 +178,6 @@ export const NewScopedTokenForm = ({values={formValues}access={access}permissionScopeMap={permissionScopeMap}- onSelectLegacyToken={() => {- handleSelectLegacyMode()- setStep('form')- }}/>)}</ScrollArea>diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenFormReview.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenFormReview.tsxindex d0b2a2b9882..3f71e882fb7 100644--- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenFormReview.tsx+++ b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/NewScopedTokenFormReview.tsx@@ -15,7 +15,6 @@ import {import { useCapabilitySummary } from '../../hooks/useCapabilitySummary'import { useOrgAndProjectData } from '../../hooks/useOrgAndProjectData'import { failingResourceLine } from '../ExceedsRoleBadge'-import { McpUnsupportedWarning } from '../McpUnsupportedWarning'import { CapabilityCategoryList, ResourceSummaryItem, RiskLevelSummary } from '../TokenSummaryRows'import { EXPIRY_OPTIONS, type TokenFormValues } from './NewScopedTokenForm.utils'import { PermissionScopeMap } from '@/data/scoped-access-tokens/permission-scope-map-query'@@ -24,15 +23,12 @@ interface ReviewStepProps {values: TokenFormValuesaccess: TokenAccessEvaluationpermissionScopeMap: PermissionScopeMap | undefined- /** Switches the form back to step one in legacy (account-wide) token mode. */- onSelectLegacyToken: () => void}export const NewScopedTokenFormReview = ({values,access,permissionScopeMap,- onSelectLegacyToken,}: ReviewStepProps) => {const { organizations, projects } = useOrgAndProjectData()const selection = values.permissions@@ -211,7 +207,6 @@ export const NewScopedTokenFormReview = ({<div className="flex flex-col gap-3"><h3 className="text-sm">MCP tools</h3>- <McpUnsupportedWarning onSelectLegacyToken={onSelectLegacyToken} />{mcpTools.length === 0 ? (<p className="text-xs text-foreground-light">No MCP tools are enabled by the selected capabilities.diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/McpUnsupportedWarning.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/McpUnsupportedWarning.tsxdeleted file mode 100644index 0e3b7ee6332..00000000000--- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/McpUnsupportedWarning.tsx+++ /dev/null@@ -1,40 +0,0 @@-import { Admonition } from 'ui-patterns/Admonition'--import { InlineLinkClassName } from '@/components/ui/InlineLink'--// Temporary warning: scoped tokens can't be used with the Supabase MCP server yet.-// Tracked by Linear DESIGN-479, blocked on the AI-1025 FGA guard migration.-// Remove once that lands: delete this module, then the two call sites (NewScopedTokenFormReview, ViewTokenSheet).--export const MCP_UNSUPPORTED_WARNING_TITLE =- "Scoped tokens don't currently work with the Supabase MCP server"-export const MCP_UNSUPPORTED_WARNING_DESCRIPTION = 'Support for scoped tokens is coming soon.'--interface McpUnsupportedWarningProps {- onSelectLegacyToken?: () => void-}--export const McpUnsupportedWarning = ({ onSelectLegacyToken }: McpUnsupportedWarningProps) => (- <Admonition- type="warning"- title={MCP_UNSUPPORTED_WARNING_TITLE}- description={- onSelectLegacyToken ? (- <p>- {MCP_UNSUPPORTED_WARNING_DESCRIPTION} If you need a full-access token for the MCP server,{' '}- <button- type="button"- className={InlineLinkClassName}- onClick={onSelectLegacyToken}- tabIndex={0}- >- create a legacy token- </button>- .- </p>- ) : (- MCP_UNSUPPORTED_WARNING_DESCRIPTION- )- }- />-)diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/NewScopedTokenSheet.test.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/NewScopedTokenSheet.test.tsxindex 81774c998fc..dce13235404 100644--- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/NewScopedTokenSheet.test.tsx+++ b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/NewScopedTokenSheet.test.tsx@@ -288,27 +288,6 @@ describe('NewScopedTokenSheet', () => {expect(screen.queryByText('Access tokens can be used to control your whole account')).toBeNull()expect(screen.queryByText('Please select an organization to continue.')).toBeNull()})- test('switches to the classic token form from the review step MCP notice', async () => {- renderSheet()- fireEvent.click(await screen.findByRole('button', { name: 'Generate new token' }))- await screen.findByRole('dialog')- await user.type(await screen.findByLabelText('Name'), 'test')- fireEvent.click(await screen.findByRole('combobox', { name: 'Organization' }))- fireEvent.click(await screen.findByRole('option', { name: 'Acme Production' }))- fireEvent.click(await screen.findByRole('combobox', { name: 'Projects' }))- fireEvent.click(await screen.findByRole('option', { name: 'Project 1' }))- await expandPermissionCategory('Project')- fireEvent.click(await screen.findByLabelText('Project Settings', { exact: false }))- fireEvent.click(await screen.findByRole('option', { name: 'Read' }))- fireEvent.click(await screen.findByRole('button', { name: 'Review access' }))- // The review step's own legacy-token link switches back into legacy mode- await screen.findByText("Scoped tokens don't currently work with the Supabase MCP server")- await user.click(await screen.findByText('create a legacy token'))- await screen.findByText('Access tokens can be used to control your whole account')- await screen.findByRole('button', { name: 'Generate token' })- expect(screen.queryByRole('button', { name: 'Review access' })).toBeNull()- expect(screen.queryByRole('button', { name: 'Create token' })).toBeNull()- })test('creates a classic token via the legacy link', async () => {renderSheet()fireEvent.click(await screen.findByRole('button', { name: 'Generate new token' }))diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/ViewTokenSheet.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/ViewTokenSheet.tsxindex b3b47b792df..edb9183e456 100644--- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/ViewTokenSheet.tsx+++ b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/ViewTokenSheet.tsx@@ -14,7 +14,6 @@ import {import { useCapabilitySummary } from '../hooks/useCapabilitySummary'import { useOrgAndProjectData } from '../hooks/useOrgAndProjectData'import { useTokenAccessEvaluation } from '../hooks/useTokenAccessEvaluation'-import { McpUnsupportedWarning } from './McpUnsupportedWarning'import { CapabilityCategoryList, ResourceSummaryItem, RiskLevelSummary } from './TokenSummaryRows'import { DocsButton } from '@/components/ui/DocsButton'import { useGetEnabledEndpointsForCapability } from '@/data/scoped-access-tokens/permission-scope-map-query'@@ -350,7 +349,6 @@ export function ViewTokenSheet({ visible, tokenId, onClose }: ViewTokenSheetProp<div className="flex flex-col gap-3"><h3 className="text-sm">MCP tools</h3>- <McpUnsupportedWarning />{mcpTools.length === 0 ? (<p className="text-xs text-foreground-light">No MCP tools are enabled by the selected capabilities.