  We will here discuss how the gamma-ray emission from molecular clouds can be
used to probe the cosmic ray flux in distant regions of the Galaxy and to
constrain the highly unknown cosmic ray diffusion coefficient. In particular we
will discuss the GeV to TeV emission from runaway cosmic rays penetrating
molecular clouds close to young and old supernova remnants and in molecular
clouds illuminated by the background cosmic ray flux.
