The chemical reactions and pathways involving medium-chain fatty-acyl-CoAs, any derivative of coenzyme A in which the sulfhydryl group is in a thioester linkage with a long-chain fatty-acyl group. A medium-chain fatty acid is a fatty acid with a chain length of between C6 and C12.