In the post, the United States ambassador to Austria, Trevor D. Traina, a former technology entrepreneur who founded and sold start-ups to companies including Microsoft, is shown smiling and shaking hands with Isabelle Kuster, the managing director of McDonald’s Austria, after signing a “memorandum of agreement.” A branded coffee cup is placed strategically on the table.

Mr. Baldia said the company was not being paid for the new service.

The United States government did not provide any particular reason for choosing McDonald’s or Austria, but Mr. Baldia said the embassy had approached the chain with the idea. In an email on Thursday, a State Department official wrote, “We work from time to time with private-sector entities and other nongovernment around the world as part of our commitment to assisting U.S. citizens in need overseas.”

While the arrangement may raise eyebrows, especially among fast-food rivals like Burger King (which has more than 40 outlets in Austria), Rupert Younger, director of the Oxford University Center for Corporate Reputation, said on Thursday: “It is a smart move for McDonald’s. The company’s engagement and interaction with American citizens abroad is very significant, making them an ideal partner for consular outreach and assistance.”

He added, “Becoming a trusted place to go when you have a personal crisis adds a new dimension to the focus on customer needs.”

The image of the fast-food chain had been tarnished by evidence of a link between the kind of food it served and the obesity crisis, and it had been working to clean up its reputation around the globe.