The Phillies are sending the Brewers three players to be named later, believed to be from the lower levels of their minor-league system.
Phelps, 33, has a 2.77 ERA and 0.69 WHIP in 12 appearances this season. He's struck out 20 and walked two in 13 innings.
He has a 2.85 ERA in 171 appearances since 2016.
The Phillies can control Phelps beyond this season if they choose. He has a $4.5 million team option for 2021 or that option can be bought out for $250,000.
Phelps has history with Phillies manager Joe Girardi, playing for him from 2012-14 with the Yankees.
The addition of Phelps means the Phillies have added four relievers via trade in the last 10 days. Brandon Workman, Heath Hembree and David Hale preceded him. Another reliever, Ranger Suarez, is expected to be added any day now from the satellite camp in Lehigh Valley.