@@ -69,6 +69,10 @@ export function createProgram(): Command {
6969 "--gateways <gateways...>" ,
7070 "Gateway configurations (format: ENV_PREFIX=gateway_id_or_name,secret_id_or_name)" ,
7171 )
72+ . option (
73+ "--mcp <specs...>" ,
74+ "MCP configurations (format: mcp_config_id_or_name,secret_id_or_name)" ,
75+ )
7276 . option (
7377 "-o, --output [format]" ,
7478 "Output format: text|json|yaml (default: text)" ,
@@ -902,6 +906,92 @@ export function createProgram(): Command {
902906 await deleteGatewayConfig ( id , options ) ;
903907 } ) ;
904908
909+ // MCP config commands
910+ const mcpConfig = program
911+ . command ( "mcp-config" )
912+ . description ( "Manage MCP configurations" )
913+ . alias ( "mcpc" ) ;
914+
915+ mcpConfig
916+ . command ( "list" )
917+ . description ( "List MCP configurations" )
918+ . option ( "--name <name>" , "Filter by name" )
919+ . option ( "--limit <n>" , "Max results" , "20" )
920+ . option (
921+ "-o, --output [format]" ,
922+ "Output format: text|json|yaml (default: json)" ,
923+ )
924+ . action ( async ( options ) => {
925+ const { listMcpConfigs } = await import ( "../commands/mcp-config/list.js" ) ;
926+ await listMcpConfigs ( options ) ;
927+ } ) ;
928+
929+ mcpConfig
930+ . command ( "create" )
931+ . description ( "Create a new MCP configuration" )
932+ . requiredOption ( "--name <name>" , "MCP config name (required)" )
933+ . requiredOption ( "--endpoint <url>" , "Target endpoint URL (required)" )
934+ . requiredOption (
935+ "--allowed-tools <tools>" ,
936+ "Allowed tool patterns, comma-separated (required, e.g. '*' or 'github.search_*,github.get_*')" ,
937+ )
938+ . option ( "--description <description>" , "Description" )
939+ . option (
940+ "-o, --output [format]" ,
941+ "Output format: text|json|yaml (default: text)" ,
942+ )
943+ . action ( async ( options ) => {
944+ const { createMcpConfig } =
945+ await import ( "../commands/mcp-config/create.js" ) ;
946+ await createMcpConfig ( options ) ;
947+ } ) ;
948+
949+ mcpConfig
950+ . command ( "get <id>" )
951+ . description ( "Get MCP configuration details" )
952+ . option (
953+ "-o, --output [format]" ,
954+ "Output format: text|json|yaml (default: json)" ,
955+ )
956+ . action ( async ( id , options ) => {
957+ const { getMcpConfig } = await import ( "../commands/mcp-config/get.js" ) ;
958+ await getMcpConfig ( { id, ...options } ) ;
959+ } ) ;
960+
961+ mcpConfig
962+ . command ( "update <id>" )
963+ . description ( "Update an MCP configuration" )
964+ . option ( "--name <name>" , "New name" )
965+ . option ( "--endpoint <url>" , "New endpoint URL" )
966+ . option (
967+ "--allowed-tools <tools>" ,
968+ "New allowed tool patterns, comma-separated" ,
969+ )
970+ . option ( "--description <description>" , "New description" )
971+ . option (
972+ "-o, --output [format]" ,
973+ "Output format: text|json|yaml (default: text)" ,
974+ )
975+ . action ( async ( id , options ) => {
976+ const { updateMcpConfig } =
977+ await import ( "../commands/mcp-config/update.js" ) ;
978+ await updateMcpConfig ( { id, ...options } ) ;
979+ } ) ;
980+
981+ mcpConfig
982+ . command ( "delete <id>" )
983+ . description ( "Delete an MCP configuration" )
984+ . alias ( "rm" )
985+ . option (
986+ "-o, --output [format]" ,
987+ "Output format: text|json|yaml (default: text)" ,
988+ )
989+ . action ( async ( id , options ) => {
990+ const { deleteMcpConfig } =
991+ await import ( "../commands/mcp-config/delete.js" ) ;
992+ await deleteMcpConfig ( id , options ) ;
993+ } ) ;
994+
905995 // MCP server commands
906996 const mcp = program
907997 . command ( "mcp" )
0 commit comments