The Magnetospheric MultiScale (MMS) mission employs a formation of spinning spacecraft with several flexible appendages and thruster-based control. To understand the complex dynamic interaction of thruster actuation, appendage motion, and spin dynamics, each spacecraft is modeled as a tree of rigid bodies connected by spherical or gimballed joints. The method presented facilitates assembling by inspection the exact, nonlinear dynamic equations of motion for a multibody spacecraft suitable for solution by numerical integration. The building block equations are derived by applying Newton's and Euler's equations of motion to an "element" consisting of two bodies and one joint (spherical and gimballed joints are considered separately). Patterns in the "mass" and L'force" matrices guide assembly by inspection of a general N-body tree-topology system. Straightforward linear algebra operations are employed to eliminate extraneous constraint equations, resulting in a minimum-dimension system of equations to solve. This method thus combines a straightforward, easily-extendable, easily-mechanized formulation with an efficient computer implementation