Skip to content

Commit a5dd0a9

Browse files
mattrossmandnywh
andauthored
feat(mcp): Gemini CLI extension instructions (supabase#42622)
### Changes - Adds instructions to install the [Supabase gemini extension](https://github.com/supabase-community/gemini-extension) in our MCP URL builder in docs / studio Note this is only shown when "Hosted" platform selected since the published extension [only bundles the hosted MCP server](https://github.com/supabase-community/gemini-extension/blob/main/gemini-extension.json#L8). ### To verify - Visit https://docs-git-mattrossman-ai-341-gemini-cli-extension-docs-supabase.vercel.app/docs/guides/getting-started/mcp and select Gemini client <img width="1944" height="1524" alt="CleanShot 2026-02-09 at 15 31 47@2x" src="https://github.com/user-attachments/assets/0e3cb54d-61f6-4857-b7f9-8e8d19b92158" /> Closes AI-341 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * MCP client installation instructions now adapt to deployment: platform-specific guided setup with external links or simplified local instructions. * **Style** * Deep-link styling updated for clearer branded link appearance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
1 parent ce3a67d commit a5dd0a9

8 files changed

Lines changed: 457 additions & 5509 deletions

File tree

apps/docs/public/img/mcp-clients/gemini-cli-dark-icon.svg

Lines changed: 100 additions & 1374 deletions
Loading

apps/docs/public/img/mcp-clients/gemini-cli-icon.svg

Lines changed: 100 additions & 1374 deletions
Loading

apps/studio/public/img/mcp-clients/gemini-cli-dark-icon.svg

Lines changed: 100 additions & 1374 deletions
Loading

apps/studio/public/img/mcp-clients/gemini-cli-icon.svg

Lines changed: 100 additions & 1374 deletions
Loading

packages/ui-patterns/src/McpUrlBuilder/components/McpConfigurationDisplay.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function McpConfigurationDisplay({
9898
)}
9999

100100
{selectedClient.primaryInstructions &&
101-
selectedClient.primaryInstructions(clientConfig, onCopyCallback)}
101+
selectedClient.primaryInstructions(clientConfig, onCopyCallback, { isPlatform })}
102102

103103
{selectedClient.configFile && (
104104
<>
@@ -122,7 +122,7 @@ export function McpConfigurationDisplay({
122122
)}
123123

124124
{selectedClient.alternateInstructions &&
125-
selectedClient.alternateInstructions(clientConfig, onCopyCallback)}
125+
selectedClient.alternateInstructions(clientConfig, onCopyCallback, { isPlatform })}
126126

127127
{(selectedClient.docsUrl || selectedClient.externalDocsUrl) && (
128128
<div className="flex items-center gap-2 text-xs text-foreground-light">
@@ -132,7 +132,7 @@ export function McpConfigurationDisplay({
132132
href={selectedClient.docsUrl}
133133
target="_blank"
134134
rel="noopener noreferrer"
135-
className="text-brand hover:underline inline-flex items-center"
135+
className="text-brand-link hover:underline inline-flex items-center"
136136
>
137137
View setup guide
138138
<ExternalLink className="h-3 w-3 ml-1" />
@@ -143,7 +143,7 @@ export function McpConfigurationDisplay({
143143
href={selectedClient.externalDocsUrl}
144144
target="_blank"
145145
rel="noopener noreferrer"
146-
className="text-brand hover:underline inline-flex items-center"
146+
className="text-brand-link hover:underline inline-flex items-center"
147147
>
148148
View {selectedClient.label} docs
149149
<ExternalLink className="h-3 w-3 ml-1" />

packages/ui-patterns/src/McpUrlBuilder/constants.tsx

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,56 @@ export const MCP_CLIENTS: McpClient[] = [
228228
},
229229
}
230230
},
231-
primaryInstructions: (config, onCopy) => {
231+
primaryInstructions: (config, onCopy, options) => {
232232
const mcpUrl = getMcpUrl(config)
233-
const command = `gemini mcp add -t http supabase ${mcpUrl}`
233+
const mcpCommand = `gemini mcp add -t http supabase ${mcpUrl}`
234234
return (
235235
<div className="space-y-2">
236236
<p className="text-xs text-warning">
237237
Ensure you are running Gemini CLI version <code>0.20.2</code> or higher.
238238
</p>
239-
<p className="text-xs text-foreground-light">
240-
Add the Supabase MCP server to Gemini CLI:
241-
</p>
239+
{options?.isPlatform && (
240+
<>
241+
<p className="text-xs text-foreground-light">
242+
Install the Supabase{' '}
243+
<a
244+
href="https://github.com/supabase-community/gemini-extension"
245+
target="_blank"
246+
rel="noopener noreferrer"
247+
className="text-brand-link hover:underline"
248+
>
249+
extension
250+
</a>{' '}
251+
for Gemini CLI. This bundles the Supabase MCP server connection,{' '}
252+
<a
253+
href="https://github.com/supabase/agent-skills"
254+
target="_blank"
255+
rel="noopener noreferrer"
256+
className="text-brand-link hover:underline"
257+
>
258+
agent skills
259+
</a>
260+
, and other context.
261+
</p>
262+
<CodeBlock
263+
value="gemini extensions install https://github.com/supabase-community/gemini-extension"
264+
language="bash"
265+
focusable={false}
266+
className="block"
267+
onCopyCallback={() => onCopy('command')}
268+
/>
269+
<p className="text-xs text-foreground-light">
270+
Or add just the MCP server to Gemini CLI:
271+
</p>
272+
</>
273+
)}
274+
{!options?.isPlatform && (
275+
<p className="text-xs text-foreground-light">
276+
Add the Supabase MCP server to Gemini CLI:
277+
</p>
278+
)}
242279
<CodeBlock
243-
value={command}
280+
value={mcpCommand}
244281
language="bash"
245282
focusable={false}
246283
className="block"
@@ -456,7 +493,7 @@ export const MCP_CLIENTS: McpClient[] = [
456493
href="https://kiro.dev/docs/powers/"
457494
target="_blank"
458495
rel="noopener noreferrer"
459-
className="text-brand hover:underline"
496+
className="text-brand-link hover:underline"
460497
>
461498
power
462499
</a>{' '}

packages/ui-patterns/src/McpUrlBuilder/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export { McpConfigPanel, type McpConfigPanelProps } from './McpConfigPanel'
1515
export type {
1616
McpClient,
1717
McpClientBaseConfig as McpClientConfig,
18+
McpClientInstructionOptions,
1819
McpOnCopyCallback,
1920
McpFeatureGroup,
2021
McpUrlBuilderConfig,

packages/ui-patterns/src/McpUrlBuilder/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export interface McpClientDeepLinkOptions {
1010
isPlatform?: boolean
1111
}
1212

13+
export interface McpClientInstructionOptions {
14+
isPlatform?: boolean
15+
}
16+
1317
export interface McpClient {
1418
key: string
1519
label: string
@@ -23,11 +27,13 @@ export interface McpClient {
2327
deepLinkDescription?: React.ReactNode
2428
primaryInstructions?: (
2529
config: McpClientConfig,
26-
onCopy: (type?: McpOnCopyCallback) => void
30+
onCopy: (type?: McpOnCopyCallback) => void,
31+
options?: McpClientInstructionOptions
2732
) => React.ReactNode
2833
alternateInstructions?: (
2934
config: McpClientConfig,
30-
onCopy: (type?: McpOnCopyCallback) => void
35+
onCopy: (type?: McpOnCopyCallback) => void,
36+
options?: McpClientInstructionOptions
3137
) => React.ReactNode
3238
}
3339

0 commit comments

Comments
 (0)