Open your .bashrc or .zshrc file and add:
# Mamp PHP Path
export PATH=/Applications/MAMP/bin/php/php5.6.10/bin:$PATH
The version number here should correspond to the version you're using in MAMP.
Next, open /Applications/MAMP/bin/php/php5.6.10 and add a folder called include and within that a folder called php
Next, you'll need to download the PHP components for php 5.6.10 (or whatever version you're using). You can (hopefully) find this at:
Copy the contents of this into the php folder you just created.
In your console, navigate to /Applications/MAMP/bin/php/php5.6.10/include/php and run ./configure. This will compile all the PHP libraries you need.
In your console, navigate to /Applications/MAMP/bin/php/php5.6.10/bin and run sudo pecl install mongo
If this command is successful, last step is to enable Mongo in PHP. Open your php.ini file (probably through the UI in MAMP), extension=mongo.so
You're missing a link to the components mentioned !