We present the cluster mass-richness scaling relation calibrated by a weak lensing analysis of ≳ 18000 galaxy cluster candidates in the Canada-France-Hawaii Telescope Lensing Survey (CFHTLenS). Detected using the 3D-Matched-Filter (MF) cluster-finder of Milkeraitis etal., these cluster candidates span a wide range of masses, from the small group scale up to∼1015 M⊙, and redshifts 0.2≲z≲0.9. The total significance of the stacked shear measurement amounts to 54σ. We compare cluster masses determined using weak lensing shear and magnification, finding the measurements in individual richness bins to yield 1σ compatibility, but with magnification estimates biased low. This first direct mass comparison yields important insights for improving the systematics handling of future lensing magnification work. In addition, we confirm analyses that suggest cluster miscentring has an important effect on the observed 3D-MF halo profiles, and we quantify this by fitting for projected cluster centroid offsets, which are typically∼0.4arcmin. We bin the cluster candidates as a function of redshift, finding similar cluster masses and richness across the full range up to z∼0.9. We measure the 3D-MF mass-richness scaling relation M200=M0(N200/20)β. We find a normalization M0∼(2.7−0.4+0.5)×1013M⊙, and a logarithmic slope of β∼1.4±0.1, both of which are in 1σ agreement with results from the magnification analysis. We find no evidence for a redshift dependence of the normalization. The CFHTLenS 3D-MF cluster catalogue is now available at cfhtlens.or