You will have to go through emigration at BOG because at MDE you will be leaving from the domestic side of the airport. So yes you will have to go through security again.
You would normally ask for your taxes back at the international departure. So BOG