Can you tell where the leak is coming from?
If it's coming out of the piston seal area, you may get lucky, and replace the piston and seal assembly, but if the aluminum bore is pitted or corroded, it's a master cylinder replacement.
There is an o-ring between the rectangular resevoir, and the metal body of the master cylinder.
I replaced my OEM rubber hoses with braided stainless lines, and I won't ever go back to rubber again, it makes that much of a difference.
The stainless lines are a bit more costly than OEM, in my opinion, it's worth it.