The deals were finalized on Thursday, and the Vikings waived quarterback Pat Devlin to make room on the roster.
Kafka was a fourth-round draft pick out of Northwestern by Philadelphia in 2010. He played in four games for the Eagles in 2011 and spent last season with the Tampa Bay Buccaneers. Devlin was the only other quarterback on the roster behind starter Teddy Bridgewater and veteran Shaun Hill.
Rayford came from the Canadian Football League, where he played last year after appearing in seven games with the Dallas Cowboys in 2013.