What temple is Sanfei Temple?

As you said, Sanfei Temple should refer to Fujian, and it can also be called Sanfei Palace. Probably originated in the Song and Yuan Dynasties, and the main object of worship was Mazu.

The three concubines are Tian Fei Mazu, Shengquanma (Wu Xu) and Chen Xiangu. According to Song Huangyan Sun's Xian Zhi? Temple "contains:" Sanfei Temple. 200 steps northeast of the county seat. First, Shunji Temple, a woman of the Lin family in Meizhou, is a witch who can know people's fortunes and enter the temple. Sailors should pray. Between Xuanhe and Xuanhe, the temple was awarded the title of Huiling Xianwei to help the heroic princess, and Song was asked by Tzu Chi to help the princess. There are temples in all coastal counties. A Zhao Hui Temple, in Xinghua County, there was a witch, a native of Youxi, who was good at casting curses and died as a shrine. In the seventh year of Chunyou, he gave a sum of money to the temple, and in the second year of Shaoxing, he gave his wife. One is Cigan Temple, that is, the God of Xianxi Temple. The traces of the three gods are different, but the city and the temple have merged, and witches say that the gods have arrived. They wanted to combine the three temples into one, and the whole city believed them, so they donated more gold and music. The palace is the crown of all the halls, and its common name is Sangong. "