diff --git a/src/components/MCPServersSection.tsx b/src/components/MCPServersSection.tsx index 1d93e6da..edb1529a 100644 --- a/src/components/MCPServersSection.tsx +++ b/src/components/MCPServersSection.tsx @@ -1,11 +1,13 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { Server, Trash2, Check } from 'lucide-react'; +import { Server, Trash2, Check, Plus } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; +import { Separator } from '@/components/ui/separator'; +import { Alert, AlertDescription } from '@/components/ui/alert'; import { useAISettings } from '@/hooks/useAISettings'; import { useToast } from '@/hooks/useToast'; import { useMCPServerStatus } from '@/hooks/useMCPServerStatus'; @@ -81,69 +83,86 @@ export function MCPServersSection() { }; return ( -
-
-

{t('mcpServers')}

+
+ {/* Divider */} + + + {/* MCP Servers Header */} +
+
+ +

{t('mcpServers')}

+
+

+ {t('mcpServersDescription')} +

-

- {t('mcpServersDescription')} -

- - {/* Configured MCP Servers */} - {serverEntries.length > 0 && ( - + {/* Configured MCP Servers List */} + {serverEntries.length > 0 ? ( +
{serverEntries.map(([name, server]) => ( - - -
- - {name} - -
-
- -
-
- - + + + +
+ + {name} +
-
- - setMCPServer(name, { ...server, url: e.target.value })} - placeholder="https://example.com/mcp" - /> + + +
+
+ + +
+
+ + setMCPServer(name, { ...server, url: e.target.value })} + placeholder="https://example.com/mcp" + /> +
+
- -
- -
+ + +
))} - +
+ ) : ( + + + {t('noMcpServersConfigured')} + + )} {/* Add New MCP Server */} -
{t('addMcpServer')}
+
+ + {t('addMcpServer')} +
@@ -185,7 +204,7 @@ export function MCPServersSection() {
); }