Soliton solutions of the KP equation have been studied since 1970, when Kadomtsev and Petviashvili proposed a two-dimensional nonlinear dispersive wave equation now known as the KP equation. It is well-known that the Wronskian approach to the KP equation provides a method to construct soliton solutions. The regular soliton solutions that one obtains in this way come from points of the totally non-negative part of the Grassmannian. In this paper we explain how the theory of total positivity and cluster algebras provides a framework for understanding these soliton solutions to the KP equation. We then use this framework to give an explicit construction of certain soliton contour graphs, and solve the inverse problem for soliton solutions coming from the totally positive part of the Grassmannian.