It's a no no to crabs in tanks with fish.
They're generally, and in the wild, scavengers, but in the confines of a tank they usually find pretty quickly that they can catch the fish.
They also need to be able to climb out of the water, so you have to have a way for them to do that. I beleive they also prefer their water slightly brackish.
Specialist, species onl,y set up for them is what I'd suggest if you want some; they don't grow very big (about 2" max), so you could have one or two in quite a small tank.