  Using a large (14,857), homogenously selected sample of cluster galaxies
identified in the Sloan Digital Sky Survey Data Release 4 (SDSS DR4), we
investigate the impact of cluster membership and local density on the stellar
mass-gas phase metallicity relation (MZR). We show that stellar metallicities
are not suitable for this work, being relatively insensitive to subtle changes
in the MZR. Accurate nebular abundances can be obtained for 1318 cluster
galaxies in our sample and we show that these galaxies are drawn from clusters
that are fully repesentative of the parent sample in terms of mass, size,
velocity dispersion and richness. By comparing the MZR of the cluster galaxies
with a sample control of galaxies matched in mass, redshift, fibre covering
fraction and rest-frame g-r colour cluster galaxies are found to have, on
average, higher metallicities by up to 0.04 dex. The magnitude of this offset
does not depend strongly on galactic half-light radius or cluster properties
such as velocity dispersion or cluster mass. The effect of local density on the
MZR is investigated, using the presence of a near neighbour and both two- and
three-dimensional density estimators. For all three metrics, it is found that
the cluster galaxies in locally rich environments have higher median
metallicities by up to ~ 0.05 dex than those in locally poor environments (or
without a near neighbour). Control (non-cluster) galaxies at locally high
densities exhibit similar metal-enhancements. Taken together, these results
show that galaxies in clusters are, on average, slightly more metal-rich than
the field, but that this effect is driven by local overdensity and not simply
cluster membership.
