What is the source of the minhag to fast three before a boys bar mitzva, I couldn’t find it in sefer haminhagim.
You are in good company. There are a number of seforim that mention this minhag, and they also don’t know where the minhag comes from, and some even say that they shouldn’t fast a full day before the Bar Mitzva etc.
See Sharei Nechama chap. 3-4, Yeshuas Daniel (Bein Hamitzarim) pg. 7 ftnt. 5, Ozer Yisroel siman 616 Biurim1.