In this paper, we propose a new and systematic design framework for output consensus in heterogeneous MultiInput Multi-Output (MIMO) general nonlinear Multi-Agent Systems (MASs) subjected to directed communication topology. First, the input-output feedback linearization method is utilized assuming that the internal dynamics is Input-to-State Stable (ISS) to obtain linearized subsystems of agents. Consequently, we propose local dynamic controllers for agents such that the linearized subsystems have an identical closed-loop dynamics which has a single pole at the origin whereas other poles are on the open left half complex plane. This allows us to deal with distinct agents having arbitrarily vector relative degrees and to derive rank-1 cooperative control inputs for those homogeneous linearized dynamics which results in a minimum rank distributed dynamic consensus controller for the initial nonlinear MAS. Moreover, we prove that the coupling strength in the consensus protocol can be arbitrarily small but positive and hence our consensus design is non-conservative. Next, our design approach is further strengthened by tackling the problem of randomly switching communication topologies among agents where we relax the assumption on the balance of each switched graph and derive a distributed rank-1 dynamic consensus controller. Lastly, a numerical example is introduced to illustrate the effectiveness of our proposed framework.