Here is a holder to mount your Z-endstop on a servo. Works with a 9g servo, but is easily customizable to whatever you're using. This is intended for use on a Makerfarm Prusa i3 with Alex Borro/ Matterhackers' auto bed-leveling mod.
Print this part. Insert the "shoulder" of your servo into the hole at the end of the main arm. Take the "single-arm" actuator/accessory, place it so that it extends along the "Slot side" of the arm. Use some m2.5 screws to attach your switch to the slot on the end of the arm and secure with the small accessory screw.
Use with either Alex Borro's replacement x-carriage end, or my parametric version.