This paper studies the design of optimal monetary policy (in terms of unconstrained Ramsey allocation) in a framework with sticky prices and matching frictions. Furthermore I consider the role of real wage rigidities. Optimal policy features significant deviations from price stability in response to various shocks. This is so since search externalities generate an unemployment/inflation trade-off. In response to productivity shocks optimal policy is pro-cyclical when the worker’s bargaining power is higher than the share of unemployed people in the matching technology and viceversa. This is so since when the workers’ share of surplus is high there are many searching workers and few vacancies hence the monetary authority has an incentive to increase vacancy profitability by reducing the interest rate and increasing inflation. The opposite is true when the workers’ share of surplus is high. This implies that optimal inflation volatility is U-shaped with respect to workers’ bargaining power.