This paper addresses the joint source/relay precoder design problem in amplify-and-forward (AF) cooperative communication systems where multiple antennas are equipped at the source, the relay, and the destination. Existing solutions to the problem only consider the relay link and, thus, do not fully exploit all the available link resource. Using a minimum-meansquared-error (MMSE) criterion, we propose a joint precoder design method, taking both the direct and relay links into account. It is shown that the MMSE is a highly nonlinear function of the precoder matrices, and a direct minimization is not feasible. To facilitate analysis, we propose to design the precoders toward first diagonalizing the MSE matrix of the relay link. This imposes certain structural constraints on both precoders that allow us to derive an analytically tractable MSE upper bound. By conducting minimization with respect to this upper bound, the solution can be obtained by an iterative waterfilling technique. Simulations show that the proposed design can significantly enhance the performance of MIMO AF cooperative systems.