I don't know how to rig this, it's kind of mechnical, I'll try to explain it:
dl the blendfile https://www.dropbox.com/s/8xtmubzqfm8pry7/mechrig.blend?dl=0
Bone.Main = should be controlling this on, by pulling up and to the side
the Bone.Arm.right and the Bone.Arm.right.stiff should be fixed in angle, just like one glued part
so, what should happen is: dragging .main up/down: opening and closing the big legs pulling main to the side: pulling the legs sideways
it's all based on kinematic, so maybe the ik constraint does this, but I've never used any before ... I tried to but I did not work, it's kind of too difficult for my knowledge state anyone can give me a hint...
I'd like to parent meshes to the bones and use a proxy armature later...