The three will reappear at the magistrate’s court on August 27, but will not be permitted to plead to the charges until Uganda's Directorate of Public Prosecutions decides the case is ready to move to the High Court.
The men were escorted under heavy security to the court where charges were read to them in a session that lasted less than 15 minutes. They were then remanded to prison.
The charge sheet identified Agad as "a preacher of Islam," while Magondu was identified as an employee of a trading company in Nairobi.
Asked on his way out of the court room if he was involved in the attacks, Magondu smiled and said "no".
Friday's charges were the first in relation to the Kampala bombings earlier in the month.
Police have previously said there was "very strong evidence" that the attacks were carried out by suicide bombers.
A police spokeswoman earlier on Friday said that several Pakistani citizens are still being held for questioning in connection with the blasts, but they have not been charged with any crimes.
At least one of the Pakistanis was identified in an email obtained by police as the Kampala-based coordinator for al-Shabab.
Al-Shabab said the attacks were carried out to punish Uganda for sending troops to Somalia as part of the African Union mission, which is supporting the fragile transition government of the Horn of Africa country.
Instead of beating a withdrawal, African leaders who wrapped up a summit in Kampala this week approved a troop surge for the Somali force to counter the armed groups seeking to topple the embattled Somali government.
AU commission chief Jean Ping said they had received pledges for 4,000 troops to beef up the force which currently comprises some 6,000 Ugandan and Burundian soldiers.
However, some observers argue that more troops risk worsening the near-daily violence in Mogadishu and buttressing the rebels' cause.
Previous military interventions by the United States and the United Nations in the early 1990s failed to quell Somalia's conflict that has raged for nearly two decades.