Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/docs/public/img/mcp-clients/kiro-dark-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions apps/docs/public/img/mcp-clients/kiro-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions apps/studio/public/img/mcp-clients/kiro-dark-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions apps/studio/public/img/mcp-clients/kiro-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui-patterns/src/McpUrlBuilder/McpConfigPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export function McpConfigPanel({
clientConfig={clientConfig}
onCopyCallback={onCopyCallback}
onInstallCallback={onInstallCallback}
isPlatform={isPlatform}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface McpConfigurationDisplayProps {
basePath: string
onCopyCallback: (type?: McpOnCopyCallback) => void
onInstallCallback?: () => void
isPlatform?: boolean
}

type ConfigFormat = CodeBlockLang | 'toml'
Expand All @@ -29,12 +30,14 @@ export function McpConfigurationDisplay({
basePath,
onCopyCallback,
onInstallCallback,
isPlatform,
}: McpConfigurationDisplayProps) {
const mcpButtonData = getMcpButtonData({
basePath,
theme,
client: selectedClient,
clientConfig,
isPlatform,
})

// Extract file extension and determine format
Expand Down Expand Up @@ -69,7 +72,9 @@ export function McpConfigurationDisplay({
<div className={cn('space-y-4', className)}>
{mcpButtonData && (
<>
<div className="text-xs text-foreground-light">Install in one click:</div>
<div className="text-xs text-foreground-light">
{selectedClient.deepLinkDescription ?? 'Install in one click:'}
</div>
<Button type="secondary" size="small" asChild>
<a
href={mcpButtonData.deepLink}
Expand All @@ -95,25 +100,26 @@ export function McpConfigurationDisplay({
selectedClient.primaryInstructions(clientConfig, onCopyCallback)}

{selectedClient.configFile && (
<div className="text-xs text-foreground-light">
{selectedClient.primaryInstructions
? 'Alternatively, add'
: mcpButtonData
? 'Or add'
: 'Add'}{' '}
this configuration to{' '}
<code className="px-1 py-0.5 bg-surface-200 rounded">{selectedClient.configFile}</code>:
</div>
<>
<div className="text-xs text-foreground-light">
{selectedClient.primaryInstructions
? 'Alternatively, add'
: mcpButtonData
? 'Or add'
: 'Add'}{' '}
this configuration to{' '}
<code className="px-1 py-0.5 bg-surface-200 rounded">{selectedClient.configFile}</code>:
</div>
<CodeBlock
value={configValue}
language={displayLanguage}
className="max-h-64 overflow-y-auto"
focusable={false}
onCopyCallback={() => onCopyCallback?.('config')}
/>
</>
)}

<CodeBlock
value={configValue}
language={displayLanguage}
className="max-h-64 overflow-y-auto"
focusable={false}
onCopyCallback={() => onCopyCallback?.('config')}
/>

{selectedClient.alternateInstructions &&
selectedClient.alternateInstructions(clientConfig, onCopyCallback)}

Expand Down
25 changes: 25 additions & 0 deletions packages/ui-patterns/src/McpUrlBuilder/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,31 @@ export const MCP_CLIENTS: McpClient[] = [
</div>
),
},
{
key: 'kiro',
label: 'Kiro',
icon: 'kiro',
configFile: '~/.kiro/settings/mcp.json',
externalDocsUrl: 'https://kiro.dev/docs/mcp/',
generateDeepLink: (_config, options) => {
const power = options?.isPlatform ? 'supabase-hosted' : 'supabase-local'
return `https://kiro.dev/launch/powers/${power}`
},
deepLinkDescription: (
<>
Install the Supabase{' '}
<a
href="https://kiro.dev/docs/powers/"
target="_blank"
rel="noopener noreferrer"
className="text-brand hover:underline"
>
power
</a>{' '}
for Kiro. This bundles the Supabase MCP server and steering files for best practices.
</>
),
},
]

export const DEFAULT_MCP_URL_PLATFORM = 'http://localhost:8080/mcp'
Expand Down
8 changes: 7 additions & 1 deletion packages/ui-patterns/src/McpUrlBuilder/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ export interface McpFeatureGroup {

export type McpOnCopyCallback = 'url' | 'config' | 'command'

export interface McpClientDeepLinkOptions {
isPlatform?: boolean
}

export interface McpClient {
key: string
label: string
icon?: string
docsUrl?: string
externalDocsUrl?: string
configFile?: string
generateDeepLink?: (config: McpClientConfig) => string | null
generateDeepLink?: (config: McpClientConfig, options?: McpClientDeepLinkOptions) => string | null
transformConfig?: (config: McpClientBaseConfig) => McpClientConfig
/** Optional custom description shown above the deep link button generated by generateDeepLink */
deepLinkDescription?: React.ReactNode
primaryInstructions?: (
config: McpClientConfig,
onCopy: (type?: McpOnCopyCallback) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ interface GetMcpButtonDataOptions {
theme?: 'light' | 'dark'
client: McpClient
clientConfig: McpClientConfig
isPlatform?: boolean
}

export function getMcpButtonData({
basePath,
theme,
client,
clientConfig,
isPlatform,
}: GetMcpButtonDataOptions) {
if (client.generateDeepLink) {
const deepLink = client.generateDeepLink(clientConfig)
const deepLink = client.generateDeepLink(clientConfig, { isPlatform })
if (!deepLink) return null

// If the theme is dark, the button background will be light and vice-versa
Expand Down
Loading