The two Iranian nationals and their Kenyan driver were arrested in a car belonging to the Iranian Embassy on Tuesday. The diplomatic status of the two Iranians was unclear.
Tasnim said the Kenyan ambassador to Tehran was summoned on Thursday by the Iranian Foreign Ministry over the arrest and that the "necessity for the immediate release of the two Iranians was underlined during the meeting".
A Foreign Ministry spokesman denied any wrongdoing by the arrested men, saying they were university teachers in Tehran.
"The two Iranians are lawyers who had gone to Kenya to provide their jailed Iranian clients in Kenya with legal counseling," spokesman Bahram Ghasemi said. "Police arrested them as they returned from a meeting with their clients in prison".
Their defense lawyer, Cohen Amanya, told Reuters after the pair's court appearance on Thursday that his clients pleaded not guilty and had been detained by Kenya's Anti Terrorism Police Unit "for further interrogation".
Iran refuses to recognize Israel's existence. In 2013, a Kenyan court jailed two Iranians for life on terrorism-related charges, including possession of explosives. The sentence was reduced to 15 years on appeal.
Kenya has suffered repeated militant attacks in recent years but those were mainly carried out by ethnic Somali militants who would be hostile to Iran because of sectarian differences.
In 2002, 15 people died when an Israeli-owned hotel was bombed in the Kenyan coastal town of Mombasa at the same time two missiles were fired at an Israeli jet, narrowly missing it.