We propose a new approach to probing ergodicity and its breakdown in quantum many-body systems based on their response to a local perturbation. We study the distribution of matrix elements of a local operator between the system’s eigenstates, finding a qualitatively different behaviour in the many-body localized (MBL) and ergodic phases. To characterize how strongly a local perturbation modifies the eigenstates, we introduce the parameter G(L) = hln(Vnm/δ)i, which represents a disorder-averaged ratio of a typical matrix element of a local operator V to the energy level spacing, δ; this parameter is reminiscent of the Thouless conductance in the single-particle localization. We show that the parameter G(L) decreases with system size L in the MBL phase, and grows in the ergodic phase. We surmise that the delocalization transition occurs when G(L) is independent of system size, G(L) = Gc ∼ 1. We illustrate our approach by studying the many-body localization transition and resolving the many-body mobility edge in a disordered 1D XXZ spin-1/2 chain using exact diagonalization and time-evolving block decimation methods. Our criterion for the MBL transition gives insights into microscopic details of transition. Its direct physical consequences, in particular logarithmically slow transport at the transition, and extensive entanglement entropy of the eigenstates, are consistent with recent renormalization group predictions.