From 8210802c21acd95040c27b486f08f81e8140b025 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 01:23:21 +0000 Subject: [PATCH 1/2] Initial plan From b9113569543d16876b82bf508a1e1768e8fccc7a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 01:31:52 +0000 Subject: [PATCH 2/2] Fix safeoutputs HTTP server: Enable stateless mode for MCP gateway compatibility Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/safe-outputs-mcp-server.cjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actions/setup/js/safe-outputs-mcp-server.cjs b/actions/setup/js/safe-outputs-mcp-server.cjs index 72b0201481f..601fbe8f79b 100644 --- a/actions/setup/js/safe-outputs-mcp-server.cjs +++ b/actions/setup/js/safe-outputs-mcp-server.cjs @@ -13,11 +13,15 @@ const { startHttpServer } = require("./safe_outputs_mcp_server_http.cjs"); // - GH_AW_SAFE_OUTPUTS_PORT // - GH_AW_SAFE_OUTPUTS_API_KEY // Log directory is configured via GH_AW_MCP_LOG_DIR environment variable +// +// NOTE: The server runs in stateless mode (no session management) because +// the MCP gateway doesn't perform the MCP protocol initialization handshake. +// It directly calls methods like tools/list without the Mcp-Session-Id header. if (require.main === module) { const port = parseInt(process.env.GH_AW_SAFE_OUTPUTS_PORT || "3001", 10); const logDir = process.env.GH_AW_MCP_LOG_DIR; - startHttpServer({ port, logDir }).catch(error => { + startHttpServer({ port, logDir, stateless: true }).catch(error => { console.error(`Failed to start safe-outputs HTTP server: ${error.message}`); process.exit(1); });