First, how do you know where a weapon can be affixed?
You can either tech up your level with special “weapons go here” actors, or you can use physics and raycasting to try to find appropriate flat upwards-facing areas.
Second, Once you know where the weapon goes, you need to switch animations (and perhaps physics) into a mode where the bipod area is fixed to the mount point, and the weapon articulates around the fulcrum. If you do this in third party, you may need to either switch the character into IK mode, or create new animations for all parts of the character for when being in “fixed” mode (similar to animations for aiming when prone, except the pivot point is different.)
If you’re in first person, then it’s a little easier; you can switch your controller to translate turning into yaw/pitch around the fulcrum, and switch camera to a camera that’s attached to the back of the gun.
You’ll also want to turn off movement when in this mode.