If we start from Klein Gordon Lagrangian density and work through canonical quantization, we could arrive at field operators for scalar fields. Now, if we solve for the free propagator we arrive at (in momentum basis): $$\Delta(p) = i/(p^2-m^2+i\epsilon).$$ But we also know that if we take the fourier transform of Yukawa potential of the Yukawa potential: $$\int d^3r \begin{equation} e^{-i\textbf{p*r}}e^{-im*\textbf{r}} \end{equation} = 4\pi/(\textbf{p}^2 + m^2),$$ which according to Lancaster and Blundell (pg 161) "is the Green's function for the time-independent Klein-Gordon equation."
Could someone please explain where in KG equation we assumed the presence of a potential that looks similar to Yukawa potential? I thought KG equation was one for relativistic free scalar particles. How is it that an equation for a free particle lead to a propagator that assumes the presence of a potential?