INNER CODE UNIT · TypeScript
resolveExplicitCallServer
openclaw/mcporter · src/cli.ts:583
function resolveExplicitCallServer(args: readonly string[]): string | undefined {
let serverFlag: string | undefined;
for (let index = 0; index < args.length; index += 1) {
const token = args[index];
if (!token) {
continue;
}
if (isHelpToken(token)) {
return undefined;
}
if (token === '--http-url' || token === '--stdio') {
return undefined;
}
if (token === '--server') {
serverFlag = args[index + 1];
index += 1;
continue;
}