Context. Studying cosmological structure formation provides insights into all of the universe's components: baryonic matter, dark matter, and, notably, dark energy. Measuring the mass function of galaxy clusters at high redshifts is particularly useful probe for both learning about the history of structure formation and constraining cosmological parameters. Aims. We attempt to derive reliable masses for a high-redshift, high-luminosity sample of galaxy clusters selected from the 400d X-ray selected cluster survey. Weak gravitational lensing allows us to determine masses that can be compared with those inferred from X-rays, forming an independent test. We focus on a particular object, CL0030+2618 at z = 0.50. Methods. Using deep imaging in three passbands acquired using the Megacam instrument at MMT, we show that Megacam is well-suited to measuring gravitational shear, i.e., the shapes of faint galaxies. A catalogue of background galaxies is constructed by analysing the photometric properties of galaxies in the g r i bands. Results. Using the aperture mass technique, we detect the weak lensing signal of CL0030+2618 at 5.8σ significance. We find significant tangential alignment of galaxies out to ∼10 or a distance of >2 r 200 from the cluster centre. The weak lensing centre of CL0030+2618 agrees with several X-ray measurements and the position of the brightest cluster galaxy. Finally, we infer a weak lensing virial mass of M 200 = 7.2 +3.6+2.3 −2.9−2.5 × 10 14 M for CL0030+2618. Conclusions. Despite complications caused by a tentative foreground galaxy group along the line of sight, the X-ray and weak lensing estimates for CL0030+2618 are in remarkable agreement.