Additional capacitors
according to the datasheet of the MCP73871, I should be adding a
  capacitor of 4.7uF at the output


If you read the data sheet for the MCP73871 on page 17 it says this: -


  Bypass to VSS with a minimum of 4.7 μF is recommended.


This means you can add more and more usually is the safer option in most circuits.

I would probably use a 10 uF for the output and another 10 uF for the LM1117's input.