Updated

The Arizona Diamondbacks made it official on Tuesday, agreeing to terms on a two-year contract with pitcher Brandon McCarthy.

No financial terms were disclosed, but according to MLB.com on Friday, the pact is worth $15.5 million.

Over 18 starts with the Oakland Athletics last season, McCarthy posted an 8-6 record and a career-best 3.24 earned run average.

The seven-year veteran missed the end of the 2012 season after he was struck in the head with a batted ball in a game against the Los Angeles Angels on Sept. 5.

McCarthy needed surgery to repair an epidural hemorrhage, brain contusion and skull fracture, but is expected to have a normal throwing program this winter.

In 153 career appearances -- 99 starts -- McCarthy has compiled a 37-39 record with a 4.02 ERA and 447 strikeouts. The right-hander has previously pitched for the Chicago White Sox and Texas in addition to the A's.