Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: add Cursor CLI instructions for Supabase MCP (#50053)

Pedro Rodrigues2b57416bc4c3
diff --git a/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts b/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts
index fe7c79f3dc4..c27fb187395 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts
+++ b/packages/ui-patterns/src/McpUrlBuilder/clients.data.ts
@@ -105,7 +105,7 @@ export const MCP_CLIENT_DATA: McpClientData[] = [
icon: 'cursor',
hasDistinctDarkIcon: true,
configFile: '.cursor/mcp.json',
- externalDocsUrl: 'https://docs.cursor.com/context/mcp',
+ externalDocsUrl: 'https://cursor.com/docs/mcp',
generateDeepLink: (config) => {
const name = 'supabase'
const mcpUrl = getMcpUrl(config)
@@ -453,6 +453,9 @@ export const MCP_CLI_COMMANDS: Record<string, McpCliCommands> = {
fx: {
authenticate: '/mcp auth supabase --open',
},
+ cursor: {
+ authenticate: 'agent mcp login supabase',
+ },
}
export const MCP_CLIENT_GROUPS = [
diff --git a/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx b/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx
index a73704c4797..e59a51c558c 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx
+++ b/packages/ui-patterns/src/McpUrlBuilder/clients.instructions.md.tsx
@@ -275,6 +275,29 @@ export const MCP_CLIENT_INSTRUCTIONS: Record<string, McpClientInstructions> = {
</>
),
},
+ cursor: {
+ alternate: () => (
+ <>
+ <paragraph>
+ To make the server available across all projects, place the configuration in{' '}
+ <inlineCode value="~/.cursor/mcp.json" /> instead.
+ </paragraph>
+ <heading depth={5}>Using Cursor CLI</heading>
+ <paragraph>
+ Cursor IDE and the Cursor CLI (<inlineCode value="agent" />) use the same MCP
+ configuration. After you add the configuration above or install with the one-click button,
+ manage the server from your terminal using the{' '}
+ <link url="https://cursor.com/docs/cli/mcp">Cursor CLI</link>.
+ </paragraph>
+ <paragraph>Approve the server locally:</paragraph>
+ <code lang="bash" value="agent mcp enable supabase" />
+ <paragraph>Authenticate with Supabase:</paragraph>
+ <code lang="bash" value={MCP_CLI_COMMANDS['cursor'].authenticate!} />
+ <paragraph>Check the server connection status:</paragraph>
+ <code lang="bash" value="agent mcp list" />
+ </>
+ ),
+ },
omp: {
primary: () => (
<>
diff --git a/packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx b/packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx
index 50031722b3e..8709f2e6adf 100644
--- a/packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx
+++ b/packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx
@@ -66,6 +66,10 @@ function reactRenderers(onCopy: (type?: McpOnCopyCallback) => void): Renderers {
{children}
</a>
),
+ heading: (node, children) => {
+ const Tag = `h${node.depth}` as 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
+ return <Tag className="text-sm font-medium text-foreground">{children}</Tag>
+ },
paragraph: (_node, children) => <p className="text-xs text-foreground-light">{children}</p>,
code: (node) => (
<CodeBlock