Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/patch-clean-mcp-config.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions actions/setup/sh/start_mcp_gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,16 @@ else
fi
echo ""

# Delete MCP server configuration file after gateway is launched
echo "Cleaning up MCP server configuration file..."
if [ -f /home/runner/.copilot/mcp-config.json ]; then
rm /home/runner/.copilot/mcp-config.json
echo "MCP server configuration file deleted"
Comment on lines +416 to +420
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting /home/runner/.copilot/mcp-config.json here will likely break later agent execution: the Copilot engine sets GH_AW_MCP_CONFIG to this path when MCP servers are enabled, and the runtime expects the file to exist during the actual Copilot CLI run. If cleanup is desired for security, consider moving it to the end of the job (e.g., in stop_mcp_gateway.sh or a dedicated always() cleanup step) or gating it behind an opt-in env flag so the config remains available for the agent.

Copilot uses AI. Check for mistakes.
else
echo "MCP server configuration file not found (already deleted or never created)"
fi
echo ""

echo "MCP gateway is running:"
echo " - From host: http://localhost:${MCP_GATEWAY_PORT}"
echo " - From containers: http://${MCP_GATEWAY_DOMAIN}:${MCP_GATEWAY_PORT}"
Expand Down