Mass transfer has been studied at atomic scale by molecular dynamics simulation of friction stir welding and vibration-assisted friction stir welding using the modified embedded atom potential. It was shown that increasing the velocity movement and decreasing the angle velocity of the tool reduce the penetration depth of atoms into the opposite crystallite in the connected pair of metals. It was shown also that increasing the amplitude of vibrations applied to the friction stir welding tool results in increasing the interpenetration of atoms belonging to the crystallites joined