X-ray absorption spectroscopy measured at the L-edge of transition metals (TMs) is a powerful element-selective tool providing direct information about the correlation effects in the 3d states. The theoretical modelling of the 2p to 3d excitation processes remains a challenge for contemporary ab initio electronic structure techniques, due to strong core-hole and multiplet effects influencing the spectra. In this work we present a realisation of the method combining the density functional theory with multiplet ligand field theory, proposed in Phys. Rev. B 85, 165113 (2012). The core of this approach is the solution of the single-impurity Anderson model (SIAM), parameterised from first principles.In our implementation, we adopt the dynamical mean-field theory and utilize the local Hamiltonian and the hybridisation function, projected onto TM 3d states, in order to construct the SIAM. We show that the current method can be used as an alternative to the construction of the Wannier functions. The developed computational scheme is applied to calculate the L-edge spectra for several TM monoxides. An excellent agreement between the theory and experiment is found for all studied systems. The possible extensions of the method as well as its limitations are discussed.