The meson-baryon molecular components for the $N^{ast}$ and $Delta ^{ast}$ resonances are investigated in terms of the compositeness, which is defined as the norm of the two-body wave function from the meson-baryon scattering amplitudes. The scattering amplitudes are constructed in a $pi N$-$eta N$-$sigma N$-$rho N$-$pi Delta$ coupled-channels problem in a meson exchange model together with several bare $N^{ast}$ and $Delta ^{ast}$ states, and parameters are fitted so as to reproduce the on-shell $pi N$ partial wave amplitudes up to the center-of-mass energy 1.9 GeV with the orbital angular momentum $L le 2$. As a result, the Roper resonance $N (1440)$ is found to be dominated by the $pi N$ and $sigma N$ molecular components while the bare-state contribution is small. The squared wave functions in coordinate space imply that both in the $pi N$ and $sigma N$ channels the separation between the meson and baryon is about more than 1 fm for the $N (1440)$ resonance. On the other hand, dominant meson-baryon molecular components are not observed in any other $N^{ast}$ and $Delta ^{ast}$ resonances in the present model, although they have some fractions of the meson-baryon clouds.