  For any reduced amalgamated free product $\mathrm{C}^*$-algebra $(A,E)=(A_1,
E_1) \ast_D (A_2,E_2)$, we introduce and study a canonical ambient
$\mathrm{C}^*$-algebra $\Delta\mathbf{T}(A,E)$ of $A$ which generalizes the
crossed product arising from the canonical action of an amalgamated free
product group on the compactification of the associated Bass--Serre tree. Using
an explicit identification of $\Delta \mathbf{T}(A,E)$ with a Cuntz--Pimsner
algebra we prove two kinds of "amenability" results for $\Delta
\mathbf{T}(A,E)$; nuclearity and universality. As applications of our
framework, we provide new conceptual, and simpler proofs of several known
theorems on approximation properties, embeddability, and $KK$-theory for
reduced amalgamated free product $\mathrm{C}^*$-algebras.
