diff --git a/.changeset/patch-clean-mcp-config.md b/.changeset/patch-clean-mcp-config.md new file mode 100644 index 0000000000..f5f72074a0 --- /dev/null +++ b/.changeset/patch-clean-mcp-config.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Gateway startup now removes `/home/runner/.copilot/mcp-config.json` after configuring the MCP server so the temporary config isn't left on disk. diff --git a/actions/setup/sh/start_mcp_gateway.sh b/actions/setup/sh/start_mcp_gateway.sh index accd64aa22..3c282df6b2 100755 --- a/actions/setup/sh/start_mcp_gateway.sh +++ b/actions/setup/sh/start_mcp_gateway.sh @@ -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" +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}"