This has happened in two forts now:
I dig down seeking magma (of course). No dice until I hit the magma sea, so I dig around until I find a suitable pumping-out site (flat-topped region of warm stone). I dig out the warm stone, dig a hole through into the sea, and slap a green glass grate over it. I go on to build a couple of pumps, load up some minecarts with magma, and get magma glass furnaces, smelters, and forges going. Hooray! All is good, and I leave the minecarts at the bottom of my long exploratory stair.
Months or years later I get: Urist McInefficient cancels Haul stone: interrupted by magma crab. And indeed, there's a magma crab crawling around my lower tunnels. Now, I breached the caverns but sealed them off, and I breached the magma sea in exactly one spot, downward, with a green glass grate covering it. That grate is intact. So where did the crab come from? As far as I can tell it spawned already inside my fortress. Putting a locked hatch ten levels up or so keeps magma crabs from visiting my dwarves, so it seems that they spawn near the magma sea but not actually in it. Does this make sense? Is this supposed to happen? Shouldn't they spawn on map edges like other wildlife?
I read something about creatures spawning near but not in magma tubes/volcanoes, but I don't have any of those anywhere nearby (none visible in the revealed part of the magma sea, in particular).
I realize that the dwarfly solution is to simply let the crabs accumulate down there - will they disappear again? - to be used as a pit to throw goblins into. Come to think of it, will a team of crabs trapped in my locked magma supply room keep other magma creatures from spawning?