Mason bee is a name now commonly used for species of bees in the genus Osmia, of the family Megachilidae. Historically mason bee has also been used to describe bees of the genus Chalicodoma, also Megachilidae, most notably in "The Mason Bee" by Jean-Henri Fabre and his translator Alexander Teixeira de Mattos (The Mason Bee, Fabre, trans Teixeira de Mattos, 1914). Mason bees are named for their habit of using mud or other “masonry” products in constructing their nests, which are made in naturally occurring gaps such as between cracks in stones or other small dark cavities; when available some species preferentially use hollow stems or holes in wood made by wood-boring insects.

Species of the genus include the orchard mason bee, Osmia lignaria, the blueberry bee, O. ribifloris, and the hornfaced bee, O. cornifrons. The former two are native to the Americas and the latter to Japan, although O. lignaria and O. cornifrons have been moved from their native ranges for commercial purposes. The red mason bee, Osmia rufa, is found across the European continent. Over 300 species are found across the Northern Hemisphere; most occur in the temperate regions, and are active from spring through late summer.

Osmia species are frequently metallic green or blue, though many are blackish and at least one rust-red. Most have black ventral scopae which are difficult to notice unless laden with pollen. They have arolia between their claws, unlike Megachile or Anthidium species.

Unlike honey bees (Apis) or bumblebees, Osmia species are solitary; every female is fertile and makes her own nest, and no worker bees for these species exist. Solitary bees produce neither honey nor beeswax. They are immune from acarine and Varroa mites, but have their own unique parasites, pests, and diseases.

When the bees emerge from their cocoons the males are the first to come out. The males typically remain near the nests waiting for the females, and some are known to actively extract females from their cocoons. When the females emerge, they mate with one to several males, the males soon die, and within a few days the females begin provisioning their nests.

Osmia females typically nest in narrow gaps and naturally occurring tubular cavities. Commonly this means hollow twigs, but can be in abandoned nests of wood-boring beetles or carpenter bees, in snail shells, under bark, or in other small protected cavities. They do not excavate their own nests. The material used for the cell can be clay, mud, grit, or chewed plant tissue. The palearctic species O. avosetta is one of a few species known for lining the nest burrows with flower petals. A female might inspect several potential nests before settling in. Within a few days of mating the female has selected a nest site and has begun to visit flowers to gather pollen and nectar for her nests; many trips are needed to complete a pollen/nectar provision mass. Once a provision mass is complete, the bee backs into the hole and lays an egg on top of the mass. Then, she creates a partition of "mud", which doubles as the back of the next cell. The process continues until she has filled the cavity. Female eggs are laid in the back of the nest, and male eggs towards the front.

Once a bee has finished with a nest, she plugs the entrance to the tube, and then may seek out another nest location.

Within weeks of hatching the larva has probably consumed all of its provisions and begins spinning a cocoon around itself and enters the pupal stage, and the adult matures either in the fall or winter, hibernating inside its insulatory cocoon. Most Osmia species are found in places where the temperature drops below 0°C for long durations and they are well-adapted to cold winters; chilling seems to be a requirement for maturation. Some species of mason bees are semi-voltine, meaning that they have a two year maturation cycle, with a full year (plus) spent as a larva.