WASHINGTON — Desperate to knock off GOP incumbents in this year’s Republican primaries, the nation’s tea party groups have spent millions only to fall short in election after election.

Yet for all the losses, from Matt Bevin in Kentucky to Chris McDaniel in Mississippi, business for the tea party has never been better.

The lack of success at the ballot hasn’t kept the groups from raising huge sums of money, adding names to their mailing lists and recruiting new volunteers. At the same time, they continue to pull the Republican Party to the right. GOP lawmakers who previously compromised with Democrats on spending, among other issues, now refuse to budge – even if it means shutting down the government and risking a default on the nation’s debt.

Those facts are frustrating mainstream Republicans, who on Wednesday implored tea party activists to rethink the money they are giving to anti-establishment groups such as Club for Growth, FreedomWorks and the Senate Conservatives Fund. All three backed the failed bid of McDaniel, a Mississippi state senator, to oust U.S. Sen. Thad Cochran after six terms in office.

“How much money did we spend in Mississippi that could have been spent picking up the majority?” asked South Carolina Republican Sen. Lindsey Graham, who had to beat back six challengers in his own primary earlier this month.

Republicans need to gain six seats in the midterm elections to take control of the Senate for the final two years of President Barack Obama’s second term, a feat that’s within reach in a year when many Democratic incumbents face dire poll numbers and are being vastly outspent by outside conservative groups.

“I hope people will think about that,” Graham told reporters in Washington.

But before the tea party groups turn their full attention to Democrats and the general election in November, they are in the midst of spending a staggering amount of money in the GOP primaries to benefit insurgent conservatives against GOP incumbents.

Tea party-aligned groups spent almost $7.2 million on McDaniel’s failed bid to deny Cochran a seventh term in the Senate. The anti-tax Club for Growth and its affiliated PAC were the largest outside spenders in Mississippi, spending more than $3.1 million to help McDaniel. Of that, $2.4 million went to messages attacking Cochran.

The same night that McDaniel came up short, they saw their $1.8 million effort to help former state House Speaker T.W. Shannon’s Senate primary campaign against Rep. James Lankford fall apart in Oklahoma. Last month, tea partyers and their allies spent roughly $1 million to support Bevin’s uphill effort against Senate Minority Leader Mitch McConnell in Kentucky.

In all, national tea party-aligned groups that must disclose their finances have raised almost $42 million since January 2013. They have spent more than $40 million but have no real wins. Mainstream Republican Senate candidates brushed aside tea party-backed candidates in North Carolina, South Carolina, Texas, Colorado and other states.

The eye-popping win for college professor David Brat over House Majority Leader Eric Cantor in Virginia’s GOP primary doesn’t count. That took nearly everyone by surprise, including the national tea party groups that gave Brat help measured by the hundreds, not the millions, of dollars.

But Brat’s win likely energized tea party hopes in Mississippi, where McDaniel initially beat Cochran in the state’s primary but failed to win the outright majority required to avoid a runoff. Undeterred by how that runoff ended, they are now looking ahead to support anti-establishment candidates in Tennessee, Kansas and Alaska.

“Nobody said taking on the establishment would be easy,” said Tea Party Patriots Fund chairman Jenny Beth Martin, whose group spent at least $745,000 in Mississippi. “We’re not backing down from fighting for the conservative principles that allow people to pursue their American dreams.”

Even without a big-time win this year, the 5-year-old tea party movement can unquestionably claim credit for accelerating a rightward drift among congressional Republicans.