In this paper, we propose a mean-field game model for the price formation of a commodity whose production is subjected to random fluctuations. The model generalizes existing deterministic price formation models. Agents seek to minimize their average cost by choosing their trading rates with a price that is characterized by a balance between supply and demand. The supply and the price processes are assumed to follow stochastic differential equations. Here, we show that, for linear dynamics and quadratic costs, the optimal trading rates are determined in feedback form. Hence, the price arises as the solution to a stochastic differential equation, whose coefficients depend on the solution of a system of ordinary differential equations.