MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / runMcpCommand

Function runMcpCommand

src/commands/mcp.ts:101–125  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

99
100/** Handle `orbcode mcp ...`. Returns the process exit code. */
101export async function runMcpCommand(args: string[]): Promise<number> {
102 const [subcommand, ...rest] = args
103
104 switch (subcommand) {
105 case "add":
106 return runAdd(rest)
107 case "remove":
108 case "rm":
109 return runRemove(rest)
110 case "list":
111 case "ls":
112 return runList(rest)
113 case "migrate":
114 case "import":
115 return runMigrate(rest)
116 case "help":
117 case "--help":
118 case "-h":
119 printMcpHelp()
120 return 0
121 default:
122 console.error(`Unknown mcp subcommand: "${subcommand ?? ""}". Try: orbcode mcp help`)
123 return 1
124 }
125}
126
127/** Parse the flags shared by add (scope, transport, env, headers, oauth). */
128function parseAddFlags(args: string[]): {

Callers 1

mainFunction · 0.85

Calls 5

runAddFunction · 0.85
runRemoveFunction · 0.85
runListFunction · 0.85
runMigrateFunction · 0.85
printMcpHelpFunction · 0.85

Tested by

no test coverage detected