Stephen's great-grandfather, Alexander Foster, migrated from Londonderry, Northern Ireland to the American colonies in 1725. He settled in Little Britain Township, Lancaster County, Pennsylvania. His son, James Foster, married Ann Barclay and moved to Virginia. Their son, James, Jr. served in the American Revolution, and sired Stephen's father William Barclay Foster in 1779. 