Solutions for the magnetohydrodynamic nano boundary layer fluid flow over a permeable stretching surface embedded in a porous medium are obtained numerically by rational Legendre collocation method. Two-dimensional and axisymmetric flows induced by stretching of the surface are considered. The effects of magnetic parameter, the porous parameter, first and second order slip and suction/injection parameters on the flow are discussed. A comparison of numerical results with previous published results is made and the results are found to be in good agreement. Keywords: Boundary-layer, Stretching sheet, Rational Legendre collocation method, Approximate solution, Porous medium, MHD