File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 264264 "type" : " string"
265265 },
266266 "description" : " Environment variables to set when running the MCP server"
267+ },
268+ "enabled" : {
269+ "type" : " boolean" ,
270+ "description" : " Enable or disable the MCP server on startup"
267271 }
268272 },
269273 "required" : [" type" , " command" ],
280284 "url" : {
281285 "type" : " string" ,
282286 "description" : " URL of the remote MCP server"
287+ },
288+ "enabled" : {
289+ "type" : " boolean" ,
290+ "description" : " Enable or disable the MCP server on startup"
283291 }
284292 },
285293 "required" : [" type" , " url" ],
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ export namespace Config {
3737 . record ( z . string ( ) , z . string ( ) )
3838 . optional ( )
3939 . describe ( "Environment variables to set when running the MCP server" ) ,
40+ enabled : z
41+ . boolean ( )
42+ . optional ( )
43+ . describe ( "Enable or disable the MCP server on startup" ) ,
4044 } )
4145 . strict ( )
4246 . openapi ( {
@@ -47,6 +51,10 @@ export namespace Config {
4751 . object ( {
4852 type : z . literal ( "remote" ) . describe ( "Type of MCP server connection" ) ,
4953 url : z . string ( ) . describe ( "URL of the remote MCP server" ) ,
54+ enabled : z
55+ . boolean ( )
56+ . optional ( )
57+ . describe ( "Enable or disable the MCP server on startup" ) ,
5058 } )
5159 . strict ( )
5260 . openapi ( {
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ export namespace MCP {
2626 [ name : string ] : Awaited < ReturnType < typeof experimental_createMCPClient > >
2727 } = { }
2828 for ( const [ key , mcp ] of Object . entries ( cfg . mcp ?? { } ) ) {
29+ if ( mcp . enabled === false ) {
30+ log . info ( "mcp server disabled" , { key } )
31+ continue
32+ }
2933 log . info ( "found" , { key, type : mcp . type } )
3034 if ( mcp . type === "remote" ) {
3135 const client = await experimental_createMCPClient ( {
You can’t perform that action at this time.
0 commit comments