After examining your added photos, here is how I would do it:
Remove the entire assembly, and clamp it well in a vice. Obtain the proper drill size for the tap you will need, from a really rough guess that looks like M6x1.0 -- but you'll need to measure the bolt (use the clean one) to be sure.
Slowly and carefully drill out the stripped hole, using minimum pressure and a lot of lubricant like WD40, kerosene, or PB blaster. Note that the "breakthrough" is going to be at an odd angle, so it's essential you proceed slowly, clearing out chips frequently, as the bit will want to "walk off" as you break though.
Retap using the proper tap. I suggest you get one with a long lead; there's no need for a bottoming tap as you will be tapping through. Be sure to reverse often to break up chips, and be particularly methodical on the last stretch, as this will have walked off some and you will only be tapping partial threads at an angle.
Now order a bolt 5mm to 10mm longer than the original from your favorite fastener supply. I think you'll be golden. Perhaps not as pretty, but I think under the handlebars not particularly visible. Note that (despite common misconceptions) only 3-4 threads bear all the load on an engaged fastener. It's like a barstool with 3 legs vs one with 25. Only 3 legs bear the total load. You can doubt me if you wish, but I know a lot about barstools...
The only other option is to use a threaded insert "helicoil", but this kit is not inexpensive, and I'm concerned how much additional "meat" you have in that cast aluminum ear. The helicoil process also needs to be approached in a thoughtful, slow, methodical manner. In this case the nice thing is that you won't have to drill through, and you can re-use the stock fastener.
Or you could price out a new housing/master cylinder, or maybe even get a used one? Seems "last resort" to me, but saves some labor and machining if you're not comfortable with drilling and tapping metal.
So, to clarify THAT ... I have a lot of helicoil kits, and if I had the right one, that would be the proper repair. If I didn't, (and I'm usually wrenching 30 minutes after I was supposed to meet up for a ride), I'd blow through the thing, tap, and use a longer bolt (I have shelves upon shelves of this stuff). Bottom line is that the helicoil kit is liable to be $50-60, whereas the tap and drill and longer bolt closer to $15. Shadetree (but sound) or sooper-professional; the choice is yours...