Hmmm... my favorite question.
It highly depends on what kind of animation you are willing to export.
3Ds Max
In 3Ds Max there is an awesome plugin called QTip. It only costs a few bucks but it's worth every single penny.
Maya
There is also another export plugin (MD2Export) for Maya. I didn't have much success with it but it's worth trying.
Blender
There are also some scripts written for Blender but none worked for me. But I think Blender 2.46 has a native export for MD2.
Stand-alone Software
Few lightweight applications have a support for export MD2:
- fragMOTION: Can import/export variety of formats and has support for MD2 and MD3
- MilkShape 3D: Same as
fragMOTION but it also has an MD2 viewer which comes handy sometimes.
- Quake2 Modeller: It's very old and I didn't try it personally.
NOTE 1: As I said, it highly depends on your animation. If you have Vertex animation then QTip is your golden choice. fragMOTION and MilkShape do not support vertex animation. But if you make Bone animation, you may use the modeling software of your choice and import it to fragMOTION or MilkShape and then export it to MD2.
NOTE 2: I think you can find more information about MD2 here