diff --git a/actions/setup/sh/check_mcp_servers.sh b/actions/setup/sh/check_mcp_servers.sh index 2d4e67c3c9..2898afe15b 100755 --- a/actions/setup/sh/check_mcp_servers.sh +++ b/actions/setup/sh/check_mcp_servers.sh @@ -83,15 +83,22 @@ while IFS= read -r SERVER_NAME; do continue fi - # Extract server URL (should be HTTP URL pointing to gateway) - SERVER_URL=$(echo "$SERVER_CONFIG" | jq -r '.url // empty' 2>/dev/null) + # Check if server is HTTP-based (has type "http" or has a URL field) + # Skip stdio servers that haven't been converted to HTTP by the gateway + SERVER_TYPE=$(echo "$SERVER_CONFIG" | jq -r '.type // empty' 2>/dev/null) + SERVER_URL_FROM_CONFIG=$(echo "$SERVER_CONFIG" | jq -r '.url // empty' 2>/dev/null) - if [ -z "$SERVER_URL" ] || [ "$SERVER_URL" = "null" ]; then + if [ "$SERVER_TYPE" != "http" ] && [ -z "$SERVER_URL_FROM_CONFIG" ]; then echo "⚠ $SERVER_NAME: skipped (not HTTP)" SERVERS_SKIPPED=$((SERVERS_SKIPPED + 1)) continue fi + # Construct server URL from GATEWAY_URL and server name + # Instead of using the URL from config (which may be 0.0.0.0), construct it from the gateway URL + # Pattern: http://gateway-url/mcp/server-name + SERVER_URL="${GATEWAY_URL}/mcp/${SERVER_NAME}" + # Extract authentication headers from gateway configuration AUTH_HEADER="" if echo "$SERVER_CONFIG" | jq -e '.headers.Authorization' >/dev/null 2>&1; then