  We investigate the relevance of Eisenstein series for representing certain
$G(Z)$-invariant string theory amplitudes which receive corrections from BPS
states only. $G(Z)$ may stand for any of the mapping class, T-duality and
U-duality groups $Sl(d,Z)$, $SO(d,d,Z)$ or $E_{d+1(d+1)}(Z)$ respectively.
Using $G(Z)$-invariant mass formulae, we construct invariant modular functions
on the symmetric space $K\backslash G(R)$ of non-compact type, with $K$ the
maximal compact subgroup of $G(R)$, that generalize the standard
non-holomorphic Eisenstein series arising in harmonic analysis on the
fundamental domain of the Poincar\'e upper half-plane. Comparing the
asymptotics and eigenvalues of the Eisenstein series under second order
differential operators with quantities arising in one- and $g$-loop string
amplitudes, we obtain a manifestly T-duality invariant representation of the
latter, conjecture their non-perturbative U-duality invariant extension, and
analyze the resulting non-perturbative effects. This includes the $R^4$ and
$R^4 H^{4g-4}$ couplings in toroidal compactifications of M-theory to any
dimension $D\geq 4$ and $D\geq 6$ respectively.
