Diminishing marginal utility MUx is the additional utility from consuming one more unit of good X (all else equal).
Diminishing Marginal Rate of Substitution is as a consumer has more of good X and less of good y, the consumer is willing to give up less y for an additional unit of x.
MRSx,y= - deltaX/deltaY holding U equal, which is the same as the negative value of the slope of the indifference curve = the rate at which consumer is willing to trade Y for X.
U(X,Y) dU=dU/dx*dx+dU/dy*dy because you are moving on an indifference curve, dU=0
0=MUx dx+MUy dy
which equals to -dy/dx=MUx/MUy
MRSx,y=MUx/MUy
Hope this helps. It is not a relationship of who is the base of whom, but it is a relationship derived from mathematical equations and the indifference curve.
My definition above shows pretty clear that the definition of the two-MU and MRS are different! But, on the graph of indifference curve, these two definitions do have a mathematical relationship, they do not have a relationship of who determines whom just because they are different ideas!