Strain relief of MagSafe cord and safety
Frayed jacketing represents a potential fire hazard if the wires themselves become exposed and overheat, short, and/or arc. Provided only the jacketing is frayed, you could use electrical tape to provide protection to the internal wires or you could add a sleeve or heat shrink tubing.

A safe answer is to order a replacement from Apple in order to protect yourself, your device, and your property.