  Magnetars are an extreme, highly magnetized class of isolated neutron stars
whose large X-ray luminosity is believed to be driven by their high magnetic
field. In this work we study for the first time the possible very high energy
gamma-ray emission above 100 GeV from magnetars, observing the sources 4U
0142+61 and 1E 2259+586. We observed the two sources with atmospheric Cherenkov
telescopes in the very high energy range (E > 100 GeV). 4U 0142+61 was observed
with the MAGIC I telescope in 2008 for ~25 h and 1E 2259+586 was observed with
the MAGIC stereoscopic system in 2010 for ~14 h. The data were analyzed with
the standard MAGIC analysis software. Neither magnetar was detected. Upper
limits to the differential and integral flux above 200 GeV were computed using
the Rolke algorithm. We obtain integral upper limits to the flux of
1.52*10^-12cm^-2 s^-1 and 2.7*10^-12cm^-2 s^-1 with a confidence level of 95%
for 4U 0142+61 and 1E 2259+586, respectively. The resulting differential upper
limits are presented together with X-ray data and upper limits in the GeV
energy range.
