Rechargeable Mg-M (M = Li, Na and K) dual-metal-ion batteries based on a Berlin green cathode and a metallic Mg anode.