The single phase non-linear loads are going to increase in the future and power quality concerns in the residential distribution grid. Since most of non-linear loads have a dispersed nature, compensating these phenomena may be complicated. On the other hand, the increased capacity of single phase grid- connected roof-top PV inverters in residential distribution grid can be an opportunity to engage these systems in the power quality issues as custom power devices. By implementing a proper control for roof-top PV inverters, these systems may in addition to inject the fundamental current, additionally act like a virtual harmonic resistance and dedicate their additional current capacity to compensate the harmonics of residential distribution grid. In this paper, each roof-top PV system is a grid harmonic supervisor, where it continually measures the PCC voltage harmonics by Sliding Discrete Fourier Transform (SDFT) algorithm and then individually compensate the measured harmonics by the proposed adaptive harmonic compensator. In the proposed approach, a current reference is separately determined for compensating each harmonic component. Then, a specific amount of additional current capacity will be dedicated for each component to compensate by using adaptive gain. Finally, the current reference is controlled by a Model Predictive Current Controller (MPCC). It has been tested in a single phase transformerless inverter (HERIC) with an LCL filter at the output. Also, the effectiveness of the control scheme has been verified by Matlab-Simulink and experimental tests.