Sam Imrie, 24, is said to have made the claim on messages which he posted on an Internet platform called Telegram.
A jury also heard that Imrie is also said to have claimed that he intended to “stream live footage” of an “incident”.
On the opening day of his trial at the High Court in Edinburgh, jurors were told police found a combat knife and a USB containing ‘extreme’ pornography during a search of his home.
Prosecutor Lisa Gillespie QC told jurors on Friday how officers found weapons in the bedroom of Sam Imrie’s home in Colliston Avenue, Glenrothes, on July 6 2019.
The court was told detectives recovered items including an axe, a black handled knife, a hammer, a rife scope and a wooden handled lock knife during the examination.
Ms Gillespie told the court how the police also recovered a “manifesto” entitled the “Great Replacement” by Brenton Tarrant as well as “nunchucks”.
Prosecutors claim that he possessed the items “with the intention of committing acts of terrorism”.
The Crown also claims that Imrie posted on a social media messaging app called Telegram and said he was going to attack Fife Islamic Centre, in Glenrothes.
When police officers went onto examine the USB stick, and an iPhone, and an Apple Mac computer which was also found during the search , they found extreme pornography.
Ms Gillespie was reading from the contents of a statement of agreed evidence between Crown lawyers and Mr Imrie’s legal team.
Imrie, of Glenrothes, denies any wrongdoing.
On Friday, Ms Gillespie said that Imrie drove a Ford Fiesta car. She said that on July 4 2019, police officers took the vehicle into their possession and searched it.
Officers found a petrol can in the front passenger footwell containing 1.65 litres of petrol. Officers also found a “small folding knife with firearm-style casing”.
Prosecutors claim that between June 22 2018 and July 4 2019, at 196 Colliston Avenue, Glenrothes, Imrie published statements on Facebook and Telegram which “glorified terrorism acts” committed by Anders Breivik and Brenton Tarrant.
He is also said to have made offensive remarks about Jewish and Muslim communities and uttered racial remarks.
The second charge states that between June 20 2019 and July 4 2019 at Colliston Avenue, Glenrothes, Fife Islamic Centre and at other locations, Imrie “with the intention of committing acts of terrorism” created and had in his possession images which “glorified terrorism”.
The charge also states that he recorded and compiled details of terrorism attacks on places of worship”. He is also said to have taken photos of the weapons which he allegedly acquired which he is said to have called his “arsenal”.
He is then said to have posted statements on Telegram which indicated his intention to stream “live footage of an incident” and that he was going to attack Fife Islamic Centre.
Imrie is represented by solicitor advocate Jim Keegan QC. He has pleaded not guilty to the charges.
The trial, before Lord Mulholland, continues.