This paper considers transmitter precoding in an amplify-and-forward cooperative system where multiple antennas are equipped at the source, the relay, and the destination. Existing methods for the problem only consider the design of the relay precoder. To further improve the performance, we include the source precoder into the design. Using a minimum-meansquare- error (MMSE) criterion, we propose a joint source/relay 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 precoding 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 bound, the solution can be obtained by an iterative water-filling technique.