The 28-year-old joined the Cumbrians on a short-term deal in February after spells in India and Canada.
He had previously played for Crewe, Derby, Coventry City and Barnsley.
"I've been chasing James all summer and negotiations have been going on since the season finished, so to get him signed on is fantastic," Glovers boss Darren Way said.
Find all the latest football transfers on our dedicated page.
Yeovil have signed midfielder James Bailey on a two-year contract after he rejected a new deal with Carlisle.