The high sensitivity requirements set by future cosmic microwave background instruments are pushing the current technologies to produce highly performant focal plane arrays with thousands of detectors. The coupling of the detectors to the telescope optics is a challenging task. Current implemented solutions include phased-array antenna-coupled detectors, platelet horn arrays, and lenslet-coupled planar antennas. There are also recent developments of flat graded-index lenses based on etched silicon. However, there are strong requirements in terms of electromagnetic performance, such as coupling efficiency and bandwidth, as well as requirements in terms of easy manufacturing and scalability, and it is very challenging to meet all these requirements with one of the above solutions. Here, we present a novel approach for producing flat metal-mesh lenslet arrays based on devices previously realized using the mesh-filter technology. We have now adapted the polypropylene-based mesh lens design to silicon substrates, thus providing a good mechanical match to the silicon-based detector arrays. The measured performance of prototype pixels operating at millimeter wavelengths is presented.