  We propose a cavity QED setup which implements a dissipative
Lipkin-Meshkov-Glick model -- an interacting collective spin system. By varying
the external model parameters the system can be made to undergo both first-and
second-order quantum phase transitions, which are signified by dramatic changes
in cavity output field properties, such as the probe laser transmission
spectrum. The steady-state entanglement between pairs of atoms is shown to peak
at the critical points and can be experimentally determined by suitable
measurements on the cavity output field. The entanglement dynamics also
exhibits pronounced variations in the vicinities of the phase transitions.
