The reason the mortgage company's name is on the check is because the insurance company knows you have a mortgage, and the mortgage company wants to protect their asset. They want to make sure that critical repairs are made.
I have found that the lender will endorse the check if you can prove the work has been adequately done, even if the amount of the repair ends up being less than the check. Thus allowing you to keep a small "profit". They just want to avoid you cashing the check while promising to do the repair.
If you are using a licensed company to perform the work, then the mortgage company usually wants to see the bill and arrange for an inspection or some other proof that the repair has been completed.
They generally distrust situations where the homeowner is using unlicensed contractors or doing the repair themselves except for the cosmetic aspects of the repair. For example they might allow you to install your own carpet, but not allow you to perform mold removal.
If you are going to perform the repairs yourself, make sure they approve of your plan in advance. You would hate to have them not approve it after you made the repairs.
If you could payoff the mortgage now, then you would be able to have the entire contents of the check available for your use.
Keep one other party to this transaction in mind. The insurance company. They expect the repairs to be done. If you skip the mold removal and just slap paint on the area, then more mold appears next year they may decide to deny the claim because the initial repair was not correctly done. Now the small mold repair project could grow to one that requires you to move out of the house for a month, all on your dime.