@protocol.commands.add('toggleoutput', outputid=protocol.UINT)
def toggleoutput(context, outputid):
    if outputid == 0:
        mute_status = context.core.mixer.get_mute().get()
        success = context.core.mixer.set_mute(not mute_status)
        if not success:
            raise exceptions.MpdSystemError('problems toggling output')
    else:
        raise exceptions.MpdNoExistError('No such audio output')
*musicpd.org, audio output section:*
dataset/ETHPy150Open mopidy/mopidy/mopidy/mpd/protocol/audio_output.py/toggleoutput