The doctors were killed in Thursday's bombing on the Defence Ministry complex in the country’s capital Sanaa.
Around a dozen militants stormed the buildings and on Friday Al-Qaeda in the Arabian Peninsula (AQAP) said it was behind the assault.
A spokesman for the Foreign Ministry in Berlin said on Friday morning that all Germans aid workers should leave Yemen “as quickly as possible.”
The German embassy in Yemen will remain open but reduced to a skeleton staff for emergencies.
Chancellor Angela Merkel’s spokesman said the chancellor was dismayed by the attack which also killed a Yemeni worker for the German development service GIZ.
The chancellor sent the relatives of those killed her condolences, spokesman Steffen Seibert said.