Traditional New Keynesian models prescribe that optimal monetary policy should aim at price
stability. In the absence of a labor market frictions, the monetary authority faces no unemployment/inflation trade-off. I study the design of optimal monetary policy in a framework with sticky prices and matching frictions in the labor market. Optimal policy features deviations from price stability in response to both productivity and government expenditure shocks. When the Hosios 1990 condition is not met, search externalities make the flexible price allocation unfeasible. Optimal deviations from price stability increase with workers’ bargaining power, as firms´ incentives to post vacancies fall and unemployment fluctuates above the Pareto efficient one.