Remove the top shells, gills, and apron from the crabs. Rinse briefly, drain well, and crack the claws so the sauce can enter.
Whisk the ketchup, chili sauce, tomato paste, soy sauce, vinegar, sugar, and stock in a bowl. In a second bowl, stir the cornstarch with the water.
Cook:
Heat the oil in a large wok over medium-high heat. Cook the garlic, ginger, and chiles for 30 seconds, then add the crab pieces and toss for 2 minutes.
Pour in the sauce, cover, and simmer for 10 to 12 minutes, turning the crab once, until the shell is bright and the meat is opaque.
Stir in the cornstarch slurry and simmer until the sauce lightly coats the crab. Pour the egg in a thin stream while stirring gently to form soft ribbons.
Serve:
Fold in the scallions and half the cilantro. Taste and balance with a little extra vinegar or sugar if needed.
Transfer to a broad serving bowl, scatter with the remaining cilantro, and serve immediately with hot mantou.
Notes
Cracking the claws before cooking makes them easier to eat and lets the sauce season the meat.
Blue crab can substitute for mud crab; use the same total weight and shorten cooking slightly for small crabs.