Besides standard thermo-mechanical conservation laws, a general description of mantle magmatism requires the simultaneous consideration of phase changes (e.g. from solid to liquid), chemical reactions (i.e. exchange of chemical components) and multiple dynamic phases (e.g. liquid percolating through a deforming matrix). Typically, these processes evolve at different rates, over multiple spatial scales and exhibit complex feedback loops and disequilibrium features. Partially due to these complexities, integrated descriptions of the thermal, mechanical and chemical evolution of mantle magmatism have been challenging for numerical models. Here we present a conceptual and numerical model that provides a versatile platform to study the dynamics and nonlinear feedbacks inherent to mantle magmatism and to make quantitative comparisons between petrological and geochemical datasets. Our model is based on the combination of three main modules: i) a Two-Phase, Multi-Component, Reactive Transport module that describes how liquids and solids evolve in space and time, ii) a melting formalism, called Dynamic Disequilibirum Melting, based on thermodynamic grounds and capable of describing the chemical exchange of major elements between phases in disequilibrium, and iii) a grain-scale model for diffusion-controlled trace-element mass transfer. We illustrate some of the benefits of the model by analyzing both major and trace elements during mantle magmatism in a mid-ocean ridge-like context. We systematically explore the effects of mantle potential temperature, upwelling velocity, degree of equilibrium and hetererogeneous sources on the compositional variability of melts and residual peridotites. Our model not only reproduces the main thermo-chemical features of decompression melting but also predicts counter-intuitive differentiation trends as a consequence of phase changes and transport occurring in disequilibrium. These include a negative correlation between and in melts generated at the same and the continued increase of the melt’s after Cpx exhaustion. Our model results also emphasize the role of disequilibrium arising from diffusion for the interpretation of trace-element signatures. The latter is shown to be able to reconcile the major- and trace-element compositions of abyssal peridotites with field evidence indicating extensive reaction between peridotites and melts. The combination of chemical disequilibrium of major elements and slugglish diffusion of trace elements may also result in weakened MREE-to-HREE depletion comparable to the effect of residual garnet in MORB, despite its absence in the modelled melts source. We also find that the crystallization of basalts ascending in disequilibrium through the asthenospheric mantle could be responsible for the formation of olivine gabbros and wehrlites that are observed in the deep sections of ophiolites. The presented framework is general and readily extendable to accommodate additional processes of geological relevance (e.g. melting in the presence of volatiles and/or of complex heterogeneous sources, refertilization of the lithospheric mantle, magma channelization and shallow processes) and the implementation of other geochemical and isotopic proxies. Here we illustrate the effect of heterogeneous sources on the thermo-mechanical-chemical evolution of melts and residues using a mixed peridotite-pyroxenite source.