The tests will include packages of whole bean and ground coffee as well as "single-cup" options, which typically include K-cups for Green Mountain Coffee Roasters' popular Keurig brewer. Test markets and pricing were not disclosed.
"We want to work with McDonald's to help consumers enjoy McCafe premium coffee in the comfort and convenience of their own homes," Kraft Foods CEO Tony Vernon told analysts on a conference call, disclosing the test for the first time. Kraft will handle the marketing and distribution of the McDonald's brand coffee.
(Read more: Did climate change kill the $1 McDonald's burger?)
McDonald's said in a statement it was "building on the momentum of our McCafe beverages in our restaurants by expanding these options."
Sales at McDonald's have gotten a big boost from its introduction of McCafe beverages, which include coffee and espresso drinks like those popularized by Starbucks. Coffee chains such as Starbucks and Dunkin' Donuts sell packaged coffee and K-cups through their shops and other retailers.
McDonald's last year starting selling packaged coffee at some of its Canadian restaurants.
(Read more: McDonald's removing Heinz from its restaurants)
Kraft got back into the U.S. premium grocery coffee business in August 2011, with a deal to sell Gevalia coffee in supermarkets. Vernon said on the call Gevalia sales have exceeded company expectations.
Kraft had a contentious split with Starbucks in March 2011. Starbucks on Wednesday said it expected to resolve its dispute before the end of calendar 2013.