McDonald's (NYSE:MCD) has reinvigorated its business in the United States and globally. That has happened partially through menu innovation and partly through technology.

The company, which reported a 6.6% comparable sales increase globally in Q2, has also seen its stock move in the right direction. After opening 2017 at $121.86, McDonald's shares closed on August 14 at $157.26, a 29% increase.

That's a very optimistic increase fueled in part by CEO Steve Easterbrook's comments in the Q2 earnings release:

We're building a better McDonald's and more customers are noticing. Our relentless commitment to running great restaurants and keeping the customer at the center of everything we do is generating broad-based strength and momentum across our entire business.

That's all true, but the long-term viability of the chain's plan remains in doubt. McDonald's has found the recipe for success for now, but significant negative headwinds remain. 

A McDonald's store

McDonald's is betting on technology to improve its future. Image source: McDonald's.

What is McDonald's doing?

The company started its turnaround by offering All-Day Breakfast, something its customers had asked for for years. It has also tried to invigorate its McCafe beverage program by offering cheap drinks. Those efforts, along with some tweaks to its food to use more natural ingredients, worked well in Q2.

"For the quarter, we delivered our strongest global comparable sales and guest count results in more than five years," Easterbrook said. "We're now introducing our Velocity Growth Plan accelerators in more restaurants around the world, bringing meaningful benefits to more customers through digital, delivery and our Experience of the Future."   

Going forward, McDonald's has decided to bet on technology. That includes ordering kiosks, adding delivery, offering mobile order pay, and improving the drive-through experience.

Will this work?

In the short term, McDonald's is ahead of the curve in the fast-food space when it comes to technology. Easterbrook detailed that progress in the chain's second-quarter earnings call.

"We are on track to make mobile order and pay available in 20,000 restaurants worldwide by the end of 2017, including our 14,000 restaurants in the U.S.," he said. The CEO also noted that while it's still early in the rollout process, the company is seeing "higher average checks and the curbside pickup is a convenience that customers value and, thus, enabling us to grow capacity at peak times." In addition, McDonald's has seen check sizes between 1.5 and 2 times larger at restaurants that offer delivery.

What the CEO has not acknowledged is that McDonald's has a first-mover advantage, but other chains will catch up. Being convenient has been a business driver for a number of chains, including Domino's (NYSE:DPZ), Starbucks, and Panera Bread. But as more companies, including the fast-casual chains that caused McDonald's problems in the first place, match its technology, it's possible its growth will slow down -- or stop.

Bulls should be wary

McDonald's has done a good job of revamping its business, but it remains vulnerable to competition. The company has started using fresh beef in some locations and has removed antibiotics from its chicken. Those are important tweaks, but they don't bring the chain's food up to par with fast-casual rivals like Shake Shack, BurgerFi, and a number of others.

If those chains, and others in the restaurant space, catch up with McDonald's technology, that may cut into McDonald's sales. That's not a guarantee. Domino's, for example, has managed long-term success through continued technology enhancement while still offering mediocre (at best) pizza.

McDonald's has a plan, and it's working for now, but current performance does not guarantee future success.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.