These crabs, found pretty much worldwide, are parasites on bivalve mollusks and some other sea animals. They are totally dependent on the host for food, oxygen and protection. They usually do little damage to the host, which is still completely edible - just eat the crab or discard it, as you please. The photo specimen was 0.41 inches across the shell, and was found inside an Asian Littleneck Clam.
While these crabs may startle and distress diners who have not previously encountered them, they have long been considered a gourmet treat, eaten either raw or cooked. It is reported that George Washington liked them scattered over his oyster soup as a garnish.
More on Crabs.