Add and remove courtesy accidentals
Three basic plugins for MuseScore v2:
this plugin will add courtesy accidentals to the selection or to the whole score, if nothing is selected. It uses the "next measure, same octave" rules.
this plugin opens a dialog first where you can configure the rules when to add accidentals and if you want them to be parenthesized.
this plugin will remove all accidentals that are not needed from the selection or the whole score, if nothing is selected. It will thus remove all accidentals created with the 'addCourtesyAccidentals' plugin, but will not limit itself to these. It'll also remove courtesy accidentals you created yourself.
Warning: Please save your work before trying these plugins. I tested them as thoroughly as I could, but they are to be considered BETA.