With MechJeb that's automatic. The problem is MechJeb has some problems with long burns. It's obviously modelling things as if the whole burn occurred at the maneuver node, a good approximation when the burn is a tiny fraction of your orbit. A terrible approximation when your burn is a reasonable fraction of your orbital period. Using the Nerva engine I'm forced to thumb my nose at Oberth and eject and capture to higher orbits.
Gotcha... try using the "Kerbal Engineer" mod instead of MecJeb... I personally haven't changed over, but I hear it is greatly improved over MJ.
The node editor in MJ really pisses me off and may send me over to KE next time I pick up KSP again.. using the mouse to drag 1 pixel to the next pixel is not how one should plan a burn. Before I got into KSP I played a MUCH more realistic simulator called Orbiter. It had built-in node editing where you could increment your burn by the millijoule (or gigajoule, or any magnitude in between). I changed to KSP because it had an actual game around it and Orbiter was almost entirely a "numbers game" and so realistic it took hours just to get to LEO. It was full scale.. actual Sol system.