Repairing a brake master cylinder depends on the problem of the cylinder. One common problem is seal leakage. To repair the leakage, detach the cylinder from the car, dismantle it, replace the piston seals, reassemble the cylinder, replace the cylinder, and bleed the brakes. A brake master cylinder kit is handy for this task.
Start by parking the car on a safe, slope-free ground, protecting the ground directly below the engine from brake fluid with old newspapers. Empty the fluid reservoir. Locate the clip that secures the sensor onto the reservoir, and release it to disconnect the two. Loosen and detach the brake lines from the cylinder with a line wrench. Unbolt the cylinder from the car's body with a socket wrench, and dislodge the cylinder from its place before plugging the brake line holes with clean rags.
To dismantle the cylinder, first place the cylinder on a working surface, and use a screwdriver to pry the reservoir off the cylinder. Locate the lock ring securing the pistons onto the cylinder and the retaining ring securing the reservoir valve in place, and use pliers to pull away the rings before detaching the valve. Remove the valve assemblies, pistons and seals from the cylinder by tapping the cylinder.
Remove the damaged pistons seals, and place new seals from the cylinder kit before reassembling the cylinder, taking care to reattach each part in its original position. Replace the cylinder into the engine, and secure it in place with bolts. Reconnect the brake lines to the cylinder, and refill the reservoir before bleeding the brakes and testing the car.