A bistable porous coordination polymer with a bond-switching mechanism showing reversible structural and functional transformations.