NBA

McGrady deal final piece for Knicks wooing James

Donnie Walsh is “all in” for this summer.

Short of building LeBron James a mansion overlooking the Hudson River, the Knicks president has done everything he can to make New York an attractive destination for the world’s greatest player at yesterday’s trade-deadline frenzy.

Walsh opened up another $9.3 million of salary-cap space — giving the Knicks a projected total of $32 million to play with — in acquiring former superstar Tracy McGrady and Kings backup point guard Sergio Rodriguez yesterday in a three-team blockbuster with the Rockets and Kings.

BACK PAGE: MCGRADY HELPS PLAYOFF CHANCES

T-WOLVES PLAN DARKO AT CENTER

The mega-deal cost the Knicks rookie lottery pick Jordan Hill, a 2012 first-round pick (protected through No. 5) and Houston’s right to swap picks in 2011 unless the Knicks win the lottery.

In addition to auditioning the 30-year-old swingman for the final 29 games to see if they will re-sign him, Walsh has more importantly created just enough cap space to sign two free agents to maximum contracts — James and a prime-time partner from the heady list of Dwyane Wade, Chris Bosh, Joe Johnson and Amar’e Stoudemire, who stayed put at the deadline.

“I think we’ve done what we could do to get as much cap room as we can next summer,” Walsh said. “I think this gives us a lot of flexibility, in a lot of different directions. It is a lot of cap space, and if you tried to figure it by how many max players are in there, I think .¤.¤. [two] is probably true.”

“I thought it was a good bet,” Walsh added.

Walsh said the draft-pick element is not that risky.

“Even if we swap [in 2011], we have a pick,” Walsh said. “I don’t think that’s a big risk if we can get the players we think we can get.”

Walsh also said with Eddy Curry coming off the books after next season, it’s not just about this summer.

“The following year we have people come off, and if we’re prudent with what we do this summer, then we’ll have room the second year,” Walsh said, referring to Carmelo Anthony’s free-agent year.

McGrady flew into New York last night, may be at practice today and could suit up tomorrow vs. Oklahoma City. McGrady has been working out in Chicago with renowned trainer Tim Grover. “Put him in a uniform and let him go Saturday,” Grover told The Post.

It’s a gamble, but a smart one, even if McGrady does not work out. There was growing concern inside the organization that standing pat would be disastrous, with James leaning toward staying in Cleveland after the Cavaliers’ addition of Antawn Jamison on Wednesday.

The departure of Jared Jeffries and Hill, who head to Houston, will save the Knicks $6.9M and $2.4M in cap room, respectively.

Now James seriously has to consider Broadway if he can bring along another star. As James said during the All-Star break, “It’s all about winning.”

The final 29 games will be all about T-Mac.

“I’m thrilled we are able to bring Tracy to New York,” T-Mac’s agent, Arn Tellem, told The Post. “Tracy is thrilled to be coming to New York to play in the Garden and for Coach D’Antoni and to play for the greatest fans in the world.

“Our intent was always for Tracy to end up in New York,” Tellem added. “It gives them a great opportunity to see Tracy for the next two months and I believe he’s got a lot of good basketball left ahead of him.”

In a 24-hour span, Walsh ravaged the roster, making three trades, dispatching six players and obtaining six players (one of whom, Brian Cardinal, will be waived).

The Knicks said so long to Nate Robinson, Jared Jeffries, Hill, Larry Hughes, Darko Milicic and Marcus Landry. Aside from T-Mac, the Knicks are boosted by Rodriguez and Boston sharpshooter Eddie House, the latter two guards whom D’Antoni likes a lot. (J.R. Giddens and Bill Walker were cap fillers in the Robinson deal.)

The Knicks and Rockets were at an impasse over protection of the first-round picks, so Houston GM Daryl Morey recruited the Kings as a third team. With the Rockets getting coveted Kevin Martin, they were less worried about the Knicks getting protection on the picks.

Returning from microfracture surgery in December, McGrady played just six games, averaged 7.7 minutes and 3.2 points before being exiled.

A handful of stars never regained form after microfracture surgery, including Allan Houston, Chris Webber, Penny Hardaway and Jamal Mashburn. Jason Kidd, Stoudemire and Antonio McDyess beat the odds.

“I can’t wait to get back on the court to continue doing what I love to do,” McGrady wrote on his Web site. “I am excited to be headed to New York and look forward to wearing a Knick uniform. I know that I can and will contribute to this organization.”

If McGrady dazzles, he, too, can be a magnet for James.

“It’s a dream to play in New York and there is nothing that compares to playing in the Garden,” McGrady wrote. “Knick fans are some of the most knowledgeable and passionate fans in the league.”

Additional reporting by Mark Hale

marc.berman@nypost.com