P Bank is the ODFI, their customer for ACH purposes is Mortgage Correspondent (MC), there should be agreements in place between the 2 concerning origination.
I'm a little unclear when you say MC ACHs the payments to X Bank. Who is listed as the Originator on the paymetn, the MC or X Bank? Is MC creating the file on behalf of X Bank with X Bank as the originator? Or is MC the originator and when credits are received, they settle with X Bank? Depending how you answer that determines if a 3rd party agreement is needed.
Of course, if P Bank is the ODFI and they want an agreement on file, they can discontinue the service until one is signed, so that is likely all a moot point.
_________________________
Providing alternative truths since the invention of time