are you sure it's that crab? while those particular crabs don't bother with sps, there are acropora crabs that live in sps and protect it, while feeing on the excrements/slime from the sps. these crabs are very good for the coral.
if it's indeed the porcelain crab pictured, he's just hiding in there temporarily. they don't really bother with corals.
they are primarily filter feeders. i believe these guys are as reef safe as a crab can be.