Would it be OK to clean with TSP on composite roof around a chimney that has stains?
TSP is a concern when it is used "above" any surface. Streaking is a common hazard and steps should be taken to minimize. Not certain as to what is referenced by "composite" roof. TSP will discolor any unfinished wood such as cedar and cypress. It will also discolor aluminum and galvanized metal.
If you need to clean, wet all the below surfaces before, during and following the application of TSP. Try to not use in direct sun.
A common error is to mix the TSP too strong. Follow the label directions.