This paper presents the radial basis function (RBF) approximation for the numerical solution of Stokes and Navier-Stokes equations in a constricted enclosure under the effect of magnetic field with different orientations. RBFs are used for the approximation of the particular solution which becomes also the approximate solution of the problem satisfying the boundary conditions. Numerical results are obtained for several values of Hartmann number and constriction ratio. As the strength of the horizontally applied magnetic field increases, Stokes flow extends covering the whole pipe. Applied magnetic field in the pipe-axis direction generates the electric potential exhibiting behavior similar to streamlines. When the constriction ratio increases, flow squeezes through the left wall regardless of the direction of the magnetic field.