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

Function runList

src/commands/mcp.ts:288–311  ·  view source on GitHub ↗

`orbcode mcp list` — print all configured servers with their scope + status.

(_args: string[])

Source from the content-addressed store, hash-verified

286
287/** `orbcode mcp list` — print all configured servers with their scope + status. */
288function runList(_args: string[]): number {
289 const { servers } = loadMcpConfig(process.cwd())
290 const names = Object.keys(servers).sort()
291 if (names.length === 0) {
292 console.log("No MCP servers configured.")
293 console.log("Add one with: orbcode mcp add <name> <command> [args...]")
294 return 0
295 }
296 for (const name of names) {
297 const cfg = servers[name]!
298 const scope = cfg.scope
299 let detail: string
300 if (cfg.type === "http" || cfg.type === "sse") {
301 detail = `${cfg.type} ${cfg.url}`
302 } else {
303 // stdio (type undefined or "stdio")
304 const cmd = cfg.command
305 const args = cfg.args ?? []
306 detail = `stdio ${cmd}${args.length ? " " + args.join(" ") : ""}`
307 }
308 console.log(` ${name.padEnd(20)} ${scope.padEnd(8)} ${detail}`)
309 }
310 return 0
311}
312
313/** `orbcode mcp migrate [--all] [--dry-run]` — copy MCP servers from Claude
314 * Code / Claude Desktop into `~/.orbcode/settings.json` (user scope).

Callers 1

runMcpCommandFunction · 0.85

Calls 1

loadMcpConfigFunction · 0.85

Tested by

no test coverage detected