The 29-year-old Pena spent most of his career as a shortstop for the Braves and Royals, but was converted to a pitcher by Kansas City in 2009. He spent last season pitching in the Giants' system, where he appeared in 53 games in Double-A and Triple-A, all in relief.
He had a 2.53 ERA and six saves in 29 appearances for Double-A Richmond but struggled (6.60 ERA) in 24 games with Triple-A Fresno. Overall, he struck out 62 in 76 1/3 innings.
Pena's father caught for the Red Sox for four years, from 1990 to 1993.
Senior writer Jayson Stark covers baseball for ESPN.com.