We demonstrate a universal reconfigurable add-drop optical filter based on arrays of digital micromirrors. Our approach allows for reconfiguration of the device parameters for operation in different sets of channel wavelengths, even or uneven channel-to-channel separation, adjustable channel passband, and dynamic add-drop of optical signals. The proposed device shows insertion loss at the center wavelength in the all-pass configuration of 7.6 dB, extinction ratio of 35 dB, channel isolation better than 24dB, negligible loss ripple, and possibility of reconfiguration time in the order of microseconds. Although designed for demonstration on optical telecommunication frequencies, the high-flexibility features of the proposed add-drop filter allow it to be used for other optical wavelength-based filtering/switching applications.