The discovery was made at the school on Basin Lane, Kilmainham on Wednesday at 11.30am.
Gardaí searched the property after receiving reports of suspicious activity in the school grounds in recent days.
The firearms, which were wrapped in plastic, were found on the school's roof.
The area was immediately sealed off for forensic examinations before the guns were removed for further examination.
An investigation into the incident is on-going and anyone with information is asked to contact An Garda Síochána.