Skip to content

Commit df0d271

Browse files
committed
feat(frontend): add hover card for Python MCP server installation warning
1 parent 23a0418 commit df0d271

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

services/frontend/src/components/mcp-server/McpServerSquareCard.vue

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { useI18n } from 'vue-i18n'
33
import { useRouter } from 'vue-router'
44
import { Button } from '@/components/ui/button'
55
import { Badge } from '@/components/ui/badge'
6+
import {
7+
HoverCard,
8+
HoverCardContent,
9+
HoverCardTrigger,
10+
} from '@/components/ui/hover-card'
611
import { Github, Star } from 'lucide-vue-next'
712
import type { McpServer } from '@/views/admin/mcp-server-catalog/types'
813
@@ -21,6 +26,11 @@ const { t } = useI18n()
2126
const router = useRouter()
2227
2328
const handleInstall = () => {
29+
// Prevent installation for Python servers
30+
if (isPythonServer(props.server.runtime)) {
31+
return
32+
}
33+
2434
emit('install', props.server)
2535
2636
router.push({
@@ -61,6 +71,11 @@ const getRuntimeBadgeClass = (runtime: string | null | undefined) => {
6171
6272
return 'bg-gray-100 text-gray-800'
6373
}
74+
75+
const isPythonServer = (runtime: string | null | undefined) => {
76+
if (!runtime) return false
77+
return runtime.toLowerCase() === 'python'
78+
}
6479
</script>
6580

6681
<template>
@@ -134,7 +149,24 @@ const getRuntimeBadgeClass = (runtime: string | null | undefined) => {
134149
</div>
135150
</dl>
136151
<div class="mt-6 border-t border-gray-900/5 px-6 py-6">
152+
<HoverCard v-if="isPythonServer(server.runtime)" :open-delay="0">
153+
<HoverCardTrigger as-child>
154+
<Button
155+
variant="outline"
156+
class="w-full flex items-center justify-center gap-2 bg-black text-white border-black hover:bg-black/90 hover:border-black hover:text-white text-sm font-semibold"
157+
>
158+
{{ t('mcpInstallations.actions.install') }} <span aria-hidden="true">&rarr;</span>
159+
</Button>
160+
</HoverCardTrigger>
161+
<HoverCardContent class="w-80">
162+
<div class="text-sm">
163+
<p class="font-semibold text-gray-900">Python MCP servers not supported yet</p>
164+
<p class="text-gray-600 mt-1">We're working on adding Python runtime support. Stay tuned!</p>
165+
</div>
166+
</HoverCardContent>
167+
</HoverCard>
137168
<Button
169+
v-else
138170
@click="handleInstall"
139171
variant="outline"
140172
class="w-full flex items-center justify-center gap-2 bg-black text-white border-black hover:bg-black/90 hover:border-black hover:text-white text-sm font-semibold"

0 commit comments

Comments
 (0)