@@ -64,105 +64,103 @@ const MCPClientSettings = ({ mcpClientStates, onUpdate, setButtonsLoading, butto
6464 >
6565 < Typography variant = "h6" > MCP Clients</ Typography >
6666 </ AccordionSummary >
67- < AccordionDetails >
68- < Paper elevation = { 0 } sx = { { p : 2 } } >
69- < List >
70- { Object . entries ( mcpClientStates ) . map ( ( [ name , mcpClientState ] ) => (
71- < ListItem key = { name } >
72- < ListItemText
73- primary = {
67+ < AccordionDetails sx = { { p : 1 } } >
68+ < List sx = { { p : 0 } } >
69+ { Object . entries ( mcpClientStates ) . map ( ( [ name , mcpClientState ] ) => (
70+ < ListItem key = { name } >
71+ < ListItemText
72+ primary = {
73+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
74+ < Typography variant = "h4" > { name } </ Typography >
75+ { ! mcpClientState . exists && < Chip label = 'No Config Found' color = 'error' /> }
76+ { mcpClientState . exists && mcpClientState . client . name !== 'Gordon' && < Chip label = { mcpClientState . configured ? 'Connected' : 'Disconnected' } color = { mcpClientState . configured ? 'success' : 'error' } /> }
77+ { mcpClientState . exists && mcpClientState . client . name === 'Gordon' && < Chip label = 'Automatic Connection Not Supported' color = 'warning' /> }
78+ < Tooltip title = { mcpClientState . preventAutoConnectMessage } >
79+ < span style = { { marginLeft : 'auto' } } >
80+ { mcpClientState . exists && mcpClientState . configured &&
81+ < Button onClick = { async ( ) => {
82+ setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
83+ await mcpClientState . client . disconnect ( client )
84+ await onUpdate ( ) ;
85+ setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
86+ } } disabled = { buttonsLoading [ name ] || Boolean ( mcpClientState . preventAutoConnectMessage ) } color = "warning" variant = "outlined" size = "small" >
87+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
88+ < Typography > Disconnect</ Typography >
89+ < LinkOff />
90+ { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
91+ </ Stack >
92+ </ Button >
93+ }
94+ { mcpClientState . exists && ! mcpClientState . configured &&
95+ < Button onClick = { async ( ) => {
96+ setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
97+ await mcpClientState . client . connect ( client )
98+ await onUpdate ( ) ;
99+ setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
100+ } } disabled = { buttonsLoading [ name ] || Boolean ( mcpClientState . preventAutoConnectMessage ) } color = "primary" size = "small" >
101+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
102+ < Typography > Connect</ Typography >
103+ < LinkRounded />
104+ { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
105+ </ Stack >
106+ </ Button >
107+ }
108+ { ! mcpClientState . exists &&
109+ < Button color = "error" variant = "outlined" size = "small" onClick = { async ( ) => {
110+ setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
111+ await mcpClientState . client . connect ( client )
112+ await onUpdate ( ) ;
113+ setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
114+ } } >
115+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
116+ < SaveOutlined />
117+ < Typography > Write Config</ Typography >
118+ { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
119+ </ Stack >
120+ </ Button >
121+ }
122+ </ span >
123+ </ Tooltip >
124+ </ Stack >
125+ }
126+ secondary = {
127+ < Stack direction = "column" justifyContent = "center" spacing = { 1 } >
74128 < Stack direction = "row" alignItems = "center" spacing = { 1 } >
75- < Typography variant = "h4" > { name } </ Typography >
76- { ! mcpClientState . exists && < Chip label = 'No Config Found' color = 'error' /> }
77- { mcpClientState . exists && < Chip label = { mcpClientState . configured ? 'Connected' : 'Disconnected' } color = { mcpClientState . configured ? 'success' : 'error' } /> }
78- < Tooltip title = { mcpClientState . client . name === 'Cursor' ? 'Connecting Cursor automatically is not yet supported. Please configure manually.' : `You may need to restart ${ mcpClientState . client . name } after changing the connection.` } >
79- < span style = { { marginLeft : 'auto' } } >
80- { mcpClientState . exists && mcpClientState . configured &&
81- < Button onClick = { async ( ) => {
82- setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
83- await mcpClientState . client . disconnect ( client )
84- await onUpdate ( ) ;
85- setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
86- } } disabled = { buttonsLoading [ name ] || mcpClientState . client . name === 'Cursor' } color = "warning" variant = "outlined" size = "small" >
87- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
88- < Typography > Disconnect</ Typography >
89- < LinkOff />
90- { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
91- </ Stack >
92- </ Button >
93- }
94- { mcpClientState . exists && ! mcpClientState . configured &&
95- < Button onClick = { async ( ) => {
96- setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
97- await mcpClientState . client . connect ( client )
98- await onUpdate ( ) ;
99- setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
100- } } disabled = { buttonsLoading [ name ] || mcpClientState . client . name === 'Cursor' } color = "primary" size = "small" >
101- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
102- < Typography > Connect</ Typography >
103- < LinkRounded />
104- { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
105- </ Stack >
106- </ Button >
107- }
108- { ! mcpClientState . exists &&
109- < Button color = "error" variant = "outlined" size = "small" onClick = { async ( ) => {
110- setButtonsLoading ( { ...buttonsLoading , [ name ] : true } ) ;
111- await mcpClientState . client . connect ( client )
112- await onUpdate ( ) ;
113- setButtonsLoading ( { ...buttonsLoading , [ name ] : false } ) ;
114- } } >
115- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
116- < SaveOutlined />
117- < Typography > Write Config</ Typography >
118- { buttonsLoading [ name ] && < CircularProgress size = { 16 } /> }
119- </ Stack >
120- </ Button >
121- }
122- </ span >
123- </ Tooltip >
124- </ Stack >
125- }
126- secondary = {
127- < Stack direction = "column" justifyContent = "center" spacing = { 1 } >
128- < Stack direction = "row" alignItems = "center" spacing = { 1 } >
129- < Link href = { mcpClientState . client . url } target = "_blank" rel = "noopener noreferrer" onClick = { ( ) => client . host . openExternal ( mcpClientState . client . url ) } > { mcpClientState . client . url } </ Link >
130-
131- </ Stack >
129+ < Link href = { mcpClientState . client . url } target = "_blank" rel = "noopener noreferrer" onClick = { ( ) => client . host . openExternal ( mcpClientState . client . url ) } > { mcpClientState . client . url } </ Link >
132130
133- < Typography sx = { { fontWeight : 'bold' } } > Expected Config Path:</ Typography >
134- < Typography component = "pre" sx = { { fontFamily : 'monospace' , whiteSpace : 'nowrap' , overflow : 'auto' , maxWidth : '80%' , backgroundColor : 'grey.200' , padding : 1 , borderRadius : 1 , fontSize : '12px' } } >
135- { mcpClientState . client . expectedConfigPath [ client . host . platform as 'win32' | 'darwin' | 'linux' ] }
136- </ Typography >
137- < Typography sx = { { fontWeight : 'bold' } } > Manually Configure:</ Typography >
138- < List sx = { { listStyleType : 'decimal' , p : 0 , pl : 2 } } >
139- { mcpClientState . client . manualConfigSteps . map ( ( step , index ) => (
140- < ListItem sx = { { display : 'list-item' , p : 0 } } key = { index } >
141- < ListItemText primary = { < div dangerouslySetInnerHTML = { { __html : step } } /> } />
142- </ ListItem >
143- ) ) }
144- </ List >
145131 </ Stack >
146- }
147- />
148- </ ListItem >
149- ) ) }
150- </ List >
151- < Divider />
152- < Alert severity = "info" >
153- < AlertTitle > Other MCP Clients</ AlertTitle >
154- You can connect other MCP clients to the same server by specifying the following command:
155- < Stack direction = "row" alignItems = "center" justifyContent = "space-evenly" spacing = { 1 } sx = { { mt : 2 } } >
156- < IconButton onClick = { ( ) => navigator . clipboard . writeText ( DOCKER_MCP_COMMAND ) } >
157- < ContentCopy />
158- </ IconButton >
159- < Typography variant = "caption" sx = { theme => ( { backgroundColor : theme . palette . grey [ 200 ] , padding : 1 , borderRadius : 1 , fontFamily : 'monospace' , whiteSpace : 'nowrap' , overflow : 'auto' } ) } >
160- { DOCKER_MCP_COMMAND }
161- </ Typography >
162- </ Stack >
163- </ Alert >
164132
165- </ Paper >
133+ < Typography sx = { { fontWeight : 'bold' } } > Expected Config Path:</ Typography >
134+ < Typography component = "pre" sx = { { fontFamily : 'monospace' , whiteSpace : 'nowrap' , overflow : 'auto' , maxWidth : '80%' , backgroundColor : 'grey.200' , padding : 1 , borderRadius : 1 , fontSize : '12px' } } >
135+ { mcpClientState . client . expectedConfigPath [ client . host . platform as 'win32' | 'darwin' | 'linux' ] }
136+ </ Typography >
137+ < Typography sx = { { fontWeight : 'bold' } } > Manually Configure:</ Typography >
138+ < List sx = { { listStyleType : 'decimal' , p : 0 , pl : 2 } } >
139+ { mcpClientState . client . manualConfigSteps . map ( ( step , index ) => (
140+ < ListItem sx = { { display : 'list-item' , p : 0 } } key = { index } >
141+ < ListItemText primary = { < div dangerouslySetInnerHTML = { { __html : step } } /> } />
142+ </ ListItem >
143+ ) ) }
144+ </ List >
145+ </ Stack >
146+ }
147+ />
148+ </ ListItem >
149+ ) ) }
150+ </ List >
151+ < Divider />
152+ < Alert severity = "info" >
153+ < AlertTitle > Other MCP Clients</ AlertTitle >
154+ You can connect other MCP clients to the same server by specifying the following command:
155+ < Stack direction = "row" alignItems = "center" justifyContent = "space-evenly" spacing = { 1 } sx = { { mt : 2 } } >
156+ < IconButton onClick = { ( ) => navigator . clipboard . writeText ( DOCKER_MCP_COMMAND ) } >
157+ < ContentCopy />
158+ </ IconButton >
159+ < Typography variant = "caption" sx = { theme => ( { backgroundColor : theme . palette . grey [ 200 ] , padding : 1 , borderRadius : 1 , fontFamily : 'monospace' , whiteSpace : 'nowrap' , overflow : 'auto' } ) } >
160+ { DOCKER_MCP_COMMAND }
161+ </ Typography >
162+ </ Stack >
163+ </ Alert >
166164 </ AccordionDetails >
167165</ Accordion >
168166
0 commit comments