Optimal monetary policy, under flexible and sticky prices, and sticky nominal wages are studied in the canonical matching model of the labor market with a working capital channel. A money demand by firms is motivated by the fact that a significant amount of M1 is held by firms. As a result of the working capital, the Ramsey-optimal monetary policy calls for inflation when employment is above the socially efficient level and for deflation when it is below that level. This result holds under flexible wages as well as nominal wage rigidities. In other words, to improve labor market efficiency, deflation is necessary to “grease the wheels of the labor market.” Although there is no relationship between optimal monetary policy and the market tightness under flexible prices, a long-run and mainly negative relationship between the optimal inflation rate and the equilibrium tightness emerges under sticky prices.