Skip to content

Convert safe-outputs MCP server to HTTP transport#11120

Merged
pelikhan merged 17 commits intomainfrom
copilot/convert-safe-outputs-to-html-transport
Jan 22, 2026
Merged

Convert safe-outputs MCP server to HTTP transport#11120
pelikhan merged 17 commits intomainfrom
copilot/convert-safe-outputs-to-html-transport

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Converting safe-outputs to HTTP transport (like safe-inputs) ✅

This task successfully converted the safe-outputs MCP server from stdio transport to HTTP transport, following the pattern established by safe-inputs.

Completed Checklist:

  • Phase 1: Create safe-outputs HTTP server JavaScript file

    • Create safe_outputs_mcp_server_http.cjs based on safe_inputs_mcp_server_http.cjs
    • Adapt the server to use safe-outputs bootstrap and handlers
    • Update safe-outputs-mcp-server.cjs entry point to use HTTP server
  • Phase 2: Generate safe-outputs HTTP server startup steps

    • Add step to generate port and API key (safe-outputs-config)
    • Add step to start HTTP server before agent job (safe-outputs-start)
    • Create shell script start_safe_outputs_server.sh to start server
  • Phase 3: Update MCP configuration rendering

    • Modify renderSafeOutputsMCPConfigWithOptions to use HTTP transport (type: http, url, headers)
    • Update TOML rendering in renderSafeOutputsTOML and renderSafeOutputsMCPConfigTOML
    • Remove stdio-specific configuration (container, entrypoint, entrypointArgs)
    • Update all engine implementations (Claude, Copilot, Codex, Custom)
  • Phase 4: Update environment variable collection

    • Add safe-outputs port and API key to MCP environment variables
    • Reference step outputs: ${{ steps.safe-outputs-start.outputs.port }}
    • Add nil check for workflowData to prevent nil pointer dereference
  • Phase 5: Testing and validation

    • Format and lint code (all passing)
    • Update tests to match HTTP transport expectations
    • Fix test mock functions signatures
    • Update TOML rendering function
    • All linting passed successfully
  • Phase 6: Merge and recompile

    • Merge main branch
    • Recompile all workflows (133/133 successful)

Summary of All Changes:

  1. ✅ Created HTTP server implementation in safe_outputs_mcp_server_http.cjs (~350 lines)
  2. ✅ Added startup steps in mcp_setup_generator.go (generates API key, starts HTTP server on port 3001)
  3. ✅ Created start_safe_outputs_server.sh shell script for server management
  4. ✅ Updated MCP config rendering to use HTTP transport with Authorization header (removed stdio fields)
  5. ✅ Added environment variables for port and API key from step outputs
  6. ✅ Updated all engine implementations (Claude, Copilot, Codex, Custom) to pass workflowData
  7. ✅ Fixed all test expectations to match HTTP transport instead of stdio
  8. ✅ Fixed nil pointer dereference in environment variable collection
  9. ✅ All code formatted and linted successfully
  10. ✅ Merged main branch and recompiled all 133 workflows

HTTP Transport Configuration:

  • Port: 3001 (safe-inputs uses 3000)
  • Type: http (instead of stdio)
  • URL: http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT (or localhost if agent disabled)
  • Headers: Authorization: $GH_AW_SAFE_OUTPUTS_API_KEY
  • Step Outputs: safe-outputs-config generates port/API key, safe-outputs-start launches server
Original prompt

Convert the safe-outputs mcp server to an HTML transport (see safe-inputs) and update the generated steps to start the safe-outputs server before the agent. Then update the generated mcp server configuration to use the http server. See how the safe-inputs is implemented in the compiler and javascript.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Changeset

  • Type: patch
  • Description: Convert the safe-outputs MCP server from stdio transport to HTTP transport. Includes HTTP server implementation, startup steps and scripts, updated MCP config rendering (HTTP transport + Authorization header), environment variables, and test/TOML updates. This is an internal implementation change with no user-facing CLI breaking changes.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI and others added 2 commits January 22, 2026 00:03
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert safe-outputs mcp server to HTML transport Convert safe-outputs MCP server to HTTP transport Jan 22, 2026
Copilot AI requested a review from pelikhan January 22, 2026 00:14
@pelikhan pelikhan added the smoke label Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@pelikhan pelikhan added smoke and removed smoke labels Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@pelikhan pelikhan added smoke and removed smoke labels Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@pelikhan pelikhan added smoke and removed smoke labels Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@pelikhan pelikhan added smoke and removed smoke labels Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

GitHub MCP (last 2 merged PR titles): ✅
Fix safe outputs HTTP MCP server rejecting tools without custom handlers
Fix safe-outputs MCP server environment variables missing in gateway Docker container
Serena activate_project: ✅
Playwright github.com title check: ✅
Tavily search results: ✅
File write + bash cat: ✅
Overall status: PASS

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

Smoke Test: PASS

  • GitHub MCP ✅
  • Serena MCP ✅
  • Playwright ✅
  • File Writing ✅
  • Bash Tool ✅

Last 2 Merged PRs:

Run: §21235693787
@pelikhan @copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

Smoke Test Results

Recent PRs:

Tests:

  • ✅ GitHub MCP
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ Tavily
  • ✅ File Writing
  • ✅ Bash Tool

Status: PASS

AI generated by Smoke Claude

@pelikhan pelikhan marked this pull request as ready for review January 22, 2026 04:14
@pelikhan pelikhan merged commit 33519f8 into main Jan 22, 2026
83 checks passed
@pelikhan pelikhan deleted the copilot/convert-safe-outputs-to-html-transport branch January 22, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants