Unfortunately the Macbook trackpad doesn't have middle click natively. However, with BetterTouchTool you can assign commands for 2, 3, 4, and even 5 finger clicks. For five finger click you have to include the thumb. This means that clicking the trackpad with your thumb while a single finger is on it is a 2 finger click, which I prefer to be a regular left click. These are all settings you can control.
Anyway, BetterTouchTool lets you configure a whole bunch of different actions (clicking or swiping in different parts of the pad with a different number of fingers) to activate a whole bunch of commands.
Someone mentioned above jitouch which handles the mm trackpad and the magic pad. I haven't tried it but it looks interesting. Not free though.
Edit: I just tried out jitouch and it works with magicprefs as much as I use it for. I only use magicprefs for the middle click function and the tracking speed. I really like the tap to switch tabs. It's a well made application and only 6 bucks. I think I am going to permanently use it now.