We show that the modular isomorphism problem has a positive answer for groups of nilpotency class 2 with cyclic center, i.e., that for such p-groups G and H an isomorphism between the group algebras FG and FH implies an isomorphism of the groups G and H for F the field of p elements. For groups of odd order this implication is also proven for F being any field of characteristic p. For groups of even order we need either to make an additional assumption on the groups or on the field.