  We establish a new connection between the theory of totally positive
Grassmannians and the theory of $\mathtt M$-curves using the finite--gap theory
for solitons of the KP equation. Here and in the following KP equation denotes
the Kadomtsev-Petviashvili 2 equation, which is the first flow from the KP
hierarchy. We also assume that all KP times are real. We associate to any point
of the real totally positive Grassmannian $Gr^{TP} (N,M)$ a reducible curve
which is a rational degeneration of an $\mathtt M$--curve of minimal genus
$g=N(M-N)$, and we reconstruct the real algebraic-geometric data \'a la
Krichever for the underlying real bounded multiline KP soliton solutions. From
this construction it follows that these multiline solitons can be explicitly
obtained by degenerating regular real finite-gap solutions corresponding to
smooth $ M$-curves. In our approach we rule the addition of each new rational
component to the spectral curve via an elementary Darboux transformation which
corresponds to a section of a specific projection $Gr^{TP} (r+1,M-N+r+1)\mapsto
Gr^{TP} (r,M-N+r)$.
