Skip to content

Commit 04661fb

Browse files
Copilotdata-douser
andcommitted
fix: address review feedback on transport selection and shell arg forwarding
- Normalize MCP_MODE to lowercase in client constructor so that MCP_MODE=STDIO works the same as MCP_MODE=stdio - Select stdio transport by default; only use HTTP when MCP_MODE === "http" (previously any non-"stdio" value fell through to HTTP) - Add shift 2 in run_tests_in_mode() so mode_name and enable_monitoring positional args are not forwarded to node as extra CLI arguments Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
1 parent c4ce20c commit 04661fb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/scripts/run-integration-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ fi
9797
run_tests_in_mode() {
9898
local mode_name="$1"
9999
local enable_monitoring="$2"
100+
shift 2
100101

101102
echo ""
102103
echo "═══════════════════════════════════════════════════════════════"

client/src/ql-mcp-client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CodeQLMCPClient {
3737
constructor(options = {}) {
3838
this.client = null;
3939
this.transport = null;
40-
this.mcpMode = process.env.MCP_MODE || "stdio";
40+
this.mcpMode = (process.env.MCP_MODE || "stdio").toLowerCase();
4141
this.serverUrl = process.env.MCP_SERVER_URL || DEFAULT_SERVER_URL;
4242
this.timeout = parseInt(options.timeout || process.env.TIMEOUT_SECONDS || "30") * 1000;
4343
this.logger = new TestLogger();
@@ -122,7 +122,7 @@ class CodeQLMCPClient {
122122
version: "1.0.0"
123123
});
124124

125-
if (this.mcpMode === "stdio") {
125+
if (this.mcpMode !== "http") {
126126
const repoRoot = path.join(__dirname, "..", "..");
127127
const serverPath =
128128
process.env.MCP_SERVER_PATH ||

0 commit comments

Comments
 (0)