The killings followed an increase in Israeli strikes across Gaza over the past week. Violence has continued since Israel and Hamas agreed a US-brokered ceasefire in October last year.
The deaths add to the toll on aid workers in a conflict that has continued despite a ceasefire, and they deepen a dispute over whether humanitarian sites are being spared.
Witnesses told the BBC the two men were sitting at the clinic entrance when an Israeli drone descended and fired a missile.
Video from the scene showed a small crater beside a plastic chair, with bloodstains and limited damage in a courtyard behind the clinic.
MSF said it was devastated and outraged. It said the strike brought to 17 the number of its workers killed in Gaza.
One of the dead was identified in accounts of the strike as Abu Hasira. Those accounts said he had worked at the clinic for a long time and had no affiliation with any armed group.
He was described as an unarmed civilian with no affiliation to any political faction or military organisation in the Gaza Strip.
The military said the strike was"not directed at a hospital"and caused no damage to medical infrastructure in the area.
MSF has previously said it takes seriously allegations from Israeli authorities that its staff have links to terrorism. It said it would"never knowingly employ people engaging in military activity"and that it uses rigorous recruitment procedures.
Israeli strikes take place almost daily in areas under the control of Hamas, home to 2.1 million people, most of them displaced.