Clustering of like-sign vortices in a planar bounded domain is known to occur at negative temperature, a phenomenon that Onsager demonstrated to be a consequence of bounded phase space. In a confined superfluid, quantized vortices can support such an ordered phase, provided they evolve as an almost isolated subsystem containing sufficient energy. A detailed theoretical understanding of the statistical mechanics of such states thus requires a microcanonical approach. Here we develop an analytical theory of the vortex clustering transition in a neutral system of quantum vortices confined to a two-dimensional disk geometry, within the microcanonical ensemble. The choice of ensemble is essential for identifying the correct thermodynamic limit of the system, enabling a rigorous description of clustering in the language of critical phenomena. As the system energy increases above a critical value, the system develops global order via the emergence of a macroscopic dipole structure from the homogeneous phase of vortices, spontaneously breaking the Z 2 symmetry associated with invariance under vortex circulation exchange, and the rotational SO(2) symmetry due to the disk geometry. The dipole structure emerges characterized by the continuous growth of the macroscopic dipole moment which serves as a global order parameter, resembling a continuous phase transition. The critical temperature of the transition, and the critical exponent associated with the dipole moment, are obtained exactly within mean-field theory. The clustering transition is shown to be distinct from the final state reached at high energy, known as supercondensation. The dipole moment develops via two macroscopic vortex clusters and the cluster locations are found analytically, both near the clustering transition and in the supercondensation limit. The microcanonical theory shows excellent agreement with Monte Carlo simulations, and signatures of the transition are apparent even for a modest system of 100 vortices, accessible in current Bose-Einstein condensate experiments.