We present a novel approach to the formation controlling of aerial robot swarms that demonstrates the flocking behavior. The proposed method stems from the Unmanned Aerial Vehicle (UAV) dynamics; thus, it prevents any unattainable control inputs from being produced and subsequently leads to feasible trajectories. By modeling the inter-agent relationships using a pairwise energy function, we show that interacting robot swarms constitute a Markov Random Field. Our algorithm builds on the Mean-Field Approximation and incorporates the collective behavioral rules: cohesion, separation, and velocity alignment. We follow a distributed control scheme and show that our method can control a swarm of UAVs to a formation and velocity consensus with real-time collision avoidance. We validate the proposed method with physical and high-fidelity simulation experiments.