Aims. To investigate the dependence of the occurrence of active galactic nuclei (AGNs) on local galaxy density, we study the nuclear properties of ∼5000 galaxies in the Coma supercluster whose density spans two orders of magnitude from the sparse filaments to the cores of rich clusters. Methods. We obtained optical spectra of the nuclei of 283 galaxies using the 1.5 m Cassini telescope of Bologna observatory. Among these galaxies, 177 belong to the Coma supercluster and are added to the 4785 spectra available from SDSS (DR7) to fill-in the incomplete coverage by SDSS of luminous galaxies. We perform a spectral classification of the nuclei of galaxies in this region (with a completeness of 98% at r ≤ 17.77), classifying the nuclear spectra in six classes: three of them (SEY, sAGN, LIN) refer to AGNs and the remaining three (HII, RET, PAS) refer to different stages of starburst activity. We perform this classification as recommended by Cid Fernandes and collaborators using the ratio of λ 6584 [NII] to Hα lines and the equivalent width of Hα (WHAN diagnostic), after correcting the last quantity by 1.3 Å for underlying absorption. Results. We find that 482 (10%) of 5027 galaxies host an AGN: their frequency strongly increases with increasing luminosity of the parent galaxies, such that 32% of galaxies with Log(L i /L ) ≥ 10.2 harbor an AGN at their interior. In addition to their presence in luminous galaxies, AGNs are also found in red galaxies with g−i 1.15±0.15 mag. The majority of SEY and sAGN (strong AGNs) are associated with luminous late-type (or S0a) galaxies, while LIN (weak AGNs) and RET ("retired": nuclei that have experienced a starburst phase in the past and are now ionized by their hot evolved low-mass stars), are mostly found among E/S0as. The number density of AGNs, HII region-like, and retired galaxies is found to anti-correlate with the local density of galaxies, such that their frequency drops by a factor of two near the cluster cores, while the frequency of galaxies containing passive nuclei increases by the same amount towards the center of rich clusters. The dependence of AGN number density on the local galaxy density is greater than the one implied by morphology segregation alone.