chore(studio): remove admonition now that mcp supports scoped pat (#48931)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

This removes the pre-cautionary admonition we had before the MCP support
for scoped access tokens landed. We can now remove this admonition (and
anything related) as it's been merged.

| Before | After |
|--------|--------|
| <img width="790" height="202" alt="Screenshot 2026-08-11 at 09 11 08"
src="https://github.com/user-attachments/assets/8b99d93f-c398-4b86-84fe-e63a2ba40e26"
/> | <img width="781" height="104" alt="Screenshot 2026-08-11 at 09 17
18"
src="https://github.com/user-attachments/assets/b28b8262-ec01-4686-ace8-50065eb22822"
/> |

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Changes**
* Removed the MCP unsupported warning from scoped access-token creation
and viewing screens.
* Removed the option to switch from scoped-token creation to the legacy
account-wide token flow.
  * MCP tools now display directly when available.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
kemal.earth authored and GitHub committed 2026-08-11 09:48:02 +01:00
1 parent a6a12c40a9
commit 1cc0682c47
5 files changed
-72

No files matched your search

@@ -178,10 +178,6 @@ export const NewScopedTokenForm = ({
values={formValues}
access={access}
permissionScopeMap={permissionScopeMap}
onSelectLegacyToken={() => {
handleSelectLegacyMode()
setStep('form')
}}
/>
)}
</ScrollArea>
@@ -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: TokenFormValues
access: TokenAccessEvaluation
permissionScopeMap: 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.
@@ -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
)
}
/>
)
@@ -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' }))
@@ -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.