This is one of those 'well known' things that every one does in different ways. I believe the notion of a covering space of a graph of groups was worked out by Bass. The details are rather technical - I prefer to think about coverings of graphs of spaces, which comes to the same thing. (I believe Scott and Wall were the first to adopt this point of view.)
In your case, every edge space can be taken to be a point. I proved some generalizations of the theorem of Stallings you mention in the following papers:
- Elementarily free groups are subgroup separable. Proc. Lond. Math. Soc. (3) 95 (2007), no. 2, 473–496.
- Hall's theorem for limit groups. Geom. Funct. Anal. 18 (2008), no. 1, 271–303.
The ideas in these papers are similar to some of Wise's work (prior to the theory of special cube complexes).
In the language of those papers, the theorem you want can be stated as follows:
Theorem: Let $X$ be a graph of spaces in which every edge space is a point and $\pi_1X$ is finitely generated. If $Y\to X$ is a finite-sheeted precovering and $\pi_1Y$ is finitely generated then $Y\to X$ can be completed to a finite-sheeted covering map $\widehat{X}\to X$.
You should look at the linked papers for the formal definition of a precovering, but it's essentially an immersion that restricts to a covering map of the vertex spaces.
It's not at all hard - the proof is a direct generalization of the theorem of Stallings that you quote.