Dependences of the tunnel magnetoresistance and in-plane component of the spin transfer torque on the applied voltage in a magnetic tunnel junction have been calculated in the approximation of ballistic transport of conduction electrons through an insulating layer with embedded magnetic or nonmagnetic nanoparticles. A single-barrier magnetic tunnel junction with a nanoparticle embedded in an insulator forms a double-barrier magnetic tunnel junction. It has been shown that the in-plane component of the spin transfer torque in the double-barrier magnetic tunnel junction can be higher than that in the single-barrier one at the same thickness of the insulating layer. The calculations show that nanoparticles embedded in the tunnel junction increase the probability of tunneling of electrons, create resonance conditions, and ensure the quantization of the conductance in contrast to the tunnel junction without nanoparticles. The calculated dependences of the tunnel magnetoresistance correspond to experimental data demonstrating peak anomalies and suppression of the maximum magnetoresistances at low voltages.