Answer:
Female mason bees can sting, but only if they're in serious danger, e.g., trapped in clothing or purposely caught in the hand. Their sting is much less painful than that of a honeybee or wasp.
Mason bees are not aggressive and will not defend their nests, rather they will flee when disturbed. The female's stinger also functions as an ovipositor or egg guide. It is not barbed like a honeybee's so they survive after stinging and can sting again. I raise them myself, and they take no notice of me, even when I am close to their 'lodge'. They are very single-minded about their jobs, and work tirelessly, only stopping to rest when the sun goes down. A single female can pollinate up to 60,000 blossoms in her lifetime of four to eight weeks.
Male mason bees have male genitalia instead of an ovipositor, and therefore they cannot sting. Male mason bees are noticeably smaller than the females, have longer antennae, and white facial tufts. The males are the first to emerge in the spring. They also visit flowers but only to get nectar for their own consumption. Once the females emerge, the males waste no time in mating with them. Then their job is done, and the females get on with pollinating flowers and provisioning their nests.