This is a quick design I came up with to mount the LIS3DH from Adafruit to an 40mm axial fan.
https://www.adafruit.com/product/2809
Just print it and mount it to your hotend cooling fan using 2-4 M3 screws. You can attach the accelerometer to the mount with plastite / self-tap screws or M2.5 machine screws.
I used this mount to tune input shaping for my Duet-powered printers. I assume this accelerometer will also work for Klipper.
The author hasn't provided the model origin yet.