@@ -27,7 +27,8 @@ import {
2727 ContentCopy ,
2828 LinkOff ,
2929 LinkRounded ,
30- SaveOutlined
30+ SaveOutlined ,
31+ InfoOutlined
3132} from '@mui/icons-material' ;
3233import { DOCKER_MCP_CONFIG , MCPClient } from '../Constants' ;
3334import { client } from '../App' ;
@@ -80,50 +81,52 @@ const Settings = ({ settings, setSettings, mcpClientStates, onUpdate }: { onUpda
8081 < List >
8182 { Object . entries ( mcpClientStates ) . map ( ( [ name , mcpClientState ] ) => (
8283 < ListItem key = { name } secondaryAction = {
83- < >
84- { mcpClientState . exists && mcpClientState . configured &&
85- < Button onClick = { async ( ) => {
86- setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
87- await mcpClientState . disconnect ( client )
88- await onUpdate ( ) ;
89- setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
90- } } disabled = { buttonsLoading [ name ] } color = "warning" variant = "outlined" size = "small" >
91- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
92- < Typography > Disconnect</ Typography >
93- < LinkOff />
94- { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
95- </ Stack >
96- </ Button >
97- }
98- { mcpClientState . exists && ! mcpClientState . configured &&
99- < Button onClick = { async ( ) => {
100- setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
101- await mcpClientState . connect ( client )
102- await onUpdate ( ) ;
103- setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
104- } } disabled = { buttonsLoading [ name ] } color = "primary" variant = "outlined" size = "small" >
105- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
106- < Typography > Connect</ Typography >
107- < LinkRounded />
108- { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
109- </ Stack >
110- </ Button >
111- }
112- { ! mcpClientState . exists &&
113- < Button color = "error" variant = "outlined" size = "small" onClick = { async ( ) => {
114- setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
115- await mcpClientState . connect ( client )
116- await onUpdate ( ) ;
117- setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
118- } } >
119- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
120- < SaveOutlined />
121- < Typography > Write Config</ Typography >
122- { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
123- </ Stack >
124- </ Button >
125- }
126- </ >
84+ < Tooltip title = "You need to restart Claude Desktop after changing the connection." >
85+ < span >
86+ { mcpClientState . exists && mcpClientState . configured &&
87+ < Button onClick = { async ( ) => {
88+ setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
89+ await mcpClientState . disconnect ( client )
90+ await onUpdate ( ) ;
91+ setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
92+ } } disabled = { buttonsLoading [ name ] } color = "warning" variant = "outlined" size = "small" >
93+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
94+ < Typography > Disconnect</ Typography >
95+ < LinkOff />
96+ { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
97+ </ Stack >
98+ </ Button >
99+ }
100+ { mcpClientState . exists && ! mcpClientState . configured &&
101+ < Button onClick = { async ( ) => {
102+ setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
103+ await mcpClientState . connect ( client )
104+ await onUpdate ( ) ;
105+ setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
106+ } } disabled = { buttonsLoading [ name ] } color = "primary" variant = "outlined" size = "small" >
107+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
108+ < Typography > Connect</ Typography >
109+ < LinkRounded />
110+ { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
111+ </ Stack >
112+ </ Button >
113+ }
114+ { ! mcpClientState . exists &&
115+ < Button color = "error" variant = "outlined" size = "small" onClick = { async ( ) => {
116+ setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
117+ await mcpClientState . connect ( client )
118+ await onUpdate ( ) ;
119+ setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
120+ } } >
121+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
122+ < SaveOutlined />
123+ < Typography > Write Config</ Typography >
124+ { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
125+ </ Stack >
126+ </ Button >
127+ }
128+ </ span >
129+ </ Tooltip >
127130 } >
128131 < ListItemText
129132 primary = {
0 commit comments