Skip to content

Commit cf7c138

Browse files
Fix --server-url flag not being parsed by CLI
Add --server-url option to CLI parser so the flag is properly recognized and passed through to the server process via the /config endpoint.
1 parent e1e702f commit cf7c138

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/src/cli.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type CliOptions = {
2424
server?: string;
2525
cli?: boolean;
2626
transport?: string;
27+
serverUrl?: string;
2728
};
2829

2930
type ServerConfig =
@@ -224,7 +225,8 @@ function parseArgs(): Args {
224225
.option("--config <path>", "config file path")
225226
.option("--server <n>", "server name from config file")
226227
.option("--cli", "enable CLI mode")
227-
.option("--transport <type>", "transport type (stdio, sse, http)");
228+
.option("--transport <type>", "transport type (stdio, sse, http)")
229+
.option("--server-url <url>", "server URL for SSE/HTTP transport");
228230

229231
// Parse only the arguments before --
230232
program.parse(preArgs);
@@ -318,6 +320,7 @@ function parseArgs(): Args {
318320
envArgs: options.e || {},
319321
cli: options.cli || false,
320322
transport: transport as "stdio" | "sse" | "streamable-http" | undefined,
323+
serverUrl: options.serverUrl,
321324
};
322325
}
323326

0 commit comments

Comments
 (0)