Ali Roba, governor of Mandera County, said one person had also been seriously injured in the attack.
But security guards had been able to save 27 other people present at the public works site, he said.
Kenya’s Daily Nation says the attack targeted “non-locals”.
Al-Shabab, an Islamist militant group, is battling the UN-backed government in Somalia, and has carried out a string of attacks in neighbouring Kenya.
Militants have carried out frequent attacks on the Mandera region, which borders Somalia. They target people who are not from the local area and security forces, Kenyan papers say.
Kenya’s The Standard said the attack happened in the early hours of Thursday at a residential plot in Bulla public works.
Attackers used a grenade to break in and then shot at those inside, it reported, citing police.
“From the nature and style of the attack, it will obviously be al-Shabab,” Governor Roba told Reuters news agency by telephone.
“If not for the quick response by our security forces, we would be talking of many more casualties now.”