The deal was announced Saturday night while the A's were playing at Seattle.
Mujica, who turns 31 on Sunday, was traded a day after being designated for assignment by the Red Sox. He was 1-1 with a 4.61 ERA in 11 games.
Mujica was in his second season with Boston. He pitched 75 times for the Red Sox, going 3-5 with eight saves and a 4.03 ERA.
In 2013, Mujica posted 37 saves for St. Louis and was an NL All-Star. He also has pitched for Cleveland, San Diego and the Marlins.
To make room on their roster, the A's transferred right-hander Jarrod Parker to the 60-day disabled list.