The insulating state of matter can be probed by means of a ground state geometrical marker, which is closely related to the modern theory of polarization (based on a Berry phase). In the present work we show that this marker can be applied to determine the metal-insulator transition in disordered systems. In particular, for noninteracting systems the geometrical marker can be obtained from the configurational average of the norm-squared one-body density matrix, which can be calculated within open as well as periodic boundary conditions. This is in sharp contrast to a classification based on the static conductivity, which is only sensible within periodic boundary conditions. We exemplify the method by considering a simple lattice model, known to have a metal-insulator transition as a function of the disorder strength, and demonstrate that the transition point can be obtained accurately from the one-body density matrix. The approach has a general ab initio formulation and could in principle be applied to realistic disordered materials by standard electronic structure methods.