I will explain recent work with Ionut Chifan in which we provide a large family of amalgamated free product groups whose amalgam structure can be completely recognized from their von Neumann algebras. Our result significantly strengthens some of the previous Bass-Serre rigidity results for von Neumann algebras. As a consequence, we obtain the first examples of amalgamated free product groups which are W$^*$-superrigid.