`orbcode mcp list` — print all configured servers with their scope + status.
(_args: string[])
| 286 | |
| 287 | /** `orbcode mcp list` — print all configured servers with their scope + status. */ |
| 288 | function 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). |
no test coverage detected