How do you bench bleed a master cylinder

You'll need to create a hydraulic circuit using hoses attached to the ports on the MC that are submerged in fluid and make sure you keep the reservoir on the MC filled as well. Once you have the hoses in dunked in the fluid and the MC reservoir is full, pump the piston until no more air comes out of the hoses. Expect the level in the MC to drop significantly, so be prepared to add to it, keeping the level full enough so you don't introduce more air. After that, you should be good to go, but make sure to plug the ports on the MC when you remove the hoses, so you don't get a ton of air back into it. Some will get in, but it shouldn't be detrimental to your efforts as you're going to open the system to air anyway when you bleed the brakes. There are check valves inside the MC that won't allow air back into the MC itself, only into the ports.
 
Good link... I JUST did this. I apparently didn't get all the bubbles out. When we put mine in the car it had very little pedal. So we bled it again IN the car.

You need a helper to do this. As the person in the car slowly starts pushing the pedal. You loosen a brake line at the master cylinder. Your goal is to open it enough to let the air out only. When the person in the car reaches the bottom of the pedal. They need to HOLD it there until you tighten the line. Just go back and forth on both brake lines, and repeat as necessary. Just remember don't crack open the line until AFTER the person in the car starts pressing on the pedal. This will insure no air gets back in.

Good luck!

edit: Also, put a bunch of rags under the master cylinder so no fluid gets on your paint. AND remember not to let your reservoir run too low.