  We develop the counterpart of weak KAM theory for potential mean field games.
This allows to describe the long time behavior of time-dependent potential mean
field game systems. Our main result is the existence of a limit, as time tends
to infinity, of the value function of an optimal control problem stated in the
space of measures. In addition, we show a mean field limit for the ergodic
constant associated with the corresponding Hamilton-Jacobi equation.
