The former couple - who split in March 2017 amid accusations the producer had been abusive - will share custody of six-year-old Madison and have also agreed to drop their restraining orders against each other but agreed to stay 200 yards award from one another, following three days of negotiations between their lawyers and a judge in Los Angeles.
Mel was ordered to pay her ex-husband $350,000 in legal fees, and both the Spice Girls star and her former spouse were told to set aside $550,000 each when they sell their old marital home in order to pay their outstanding tax bills.
In addition to paying the legal bill - half of which must be handed over now and the remainder following the property sale - the 43-year-old singer must pay Stephen $5,000 a month in child support for Madison.
Speaking after Monday's (06.08.18) hearing at Los Angeles Superior Court, Stephen told DailyMail.com: ''I'm ecstatic - I'm going to Disneyworld. I got everything I wanted and we could have settled this months ago. It's such a relief that it's finally over.''
However, the 43-year-old producer admitted he was ''disappointed'' that his request for visitation with Mel's 10-year-old daughter Angel - whose birth father is Eddie Murphy but who Stephen has helped raise since she was a baby - was not part of the agreement, though he may make a fresh bid for access in the future.
He said: ''We wanted to get all the other issues between us settled so I decided to table that.
''But it's very possible I could try again - because I would really like to spend time with Angel.''
Though the former couple have agreed to stay away from one another, exceptions will be made for Madison's school events, including extra-curricular activities and teacher conferences.
They have also been ordered not to speak badly about one another in front of Madison.
The agreement states: ''Neither parent shall make any disparaging remarks about the other parent to Madison or in Madison's presence.''
Mel - who also has 19-year-old daughter Phoenix from her first marriage to Jimmy Gulzar - and Stephen will divide their time with Madison, including holidays and school breaks.
The 'Stop' singer will take the little girl during Mother's Day weekend, and Stephen will have her over Father's Day weekend.
When it is Madison's birthday, she will be with one of her parents on alternate years, with the producer - who is also father to 13-year-old Giselle - taking her for odd years.
Each parent will be allowed to take the youngster outside of the US during their custodial time, so long as they provide an itinerary to the other parent at least a week before travelling.