We associate a Lie bialgebroid structure to the algebra of formal Pseudo-differential operators, as the classical limit of a quantum groupoid. As a consequence, the non-commutative Kadomtsev–Petviashvili hierarchy is naturally obtained by an algebraic procedure.