The fast food chain is slowly moving toward becoming more like a coffee shop, selling breakfast pastries and expanding its morning menu. It has reportedly started testing bagged coffee in stores.

The chain also faces more competition than ever. Last week, Taco Bell launched a national breakfast menu that competes directly with McDonald's breakfast menu.

The burger chain gets 20% of its revenue from breakfast sales and can't afford to keep losing customers.

Here's four ways McDonald's is trying to attract coffee drinkers.

1. McDonald's is offering free McCafe for two weeks, starting March 31. The coffee is only free during the chain's breakfast hours, which end at 10:30 a.m. at most U.S. locations. The company has been posting about the offer at least hourly for the last two days on Twitter and Facebook.