Accused Monsey stabber Grafton Thomas kept journals filled with anti-Semitic writing and used a cellphone to search for “Zionist Temples,” including on Staten Island, according to court papers filed by federal prosecutors on Monday.

Thomas, 37, even allegedly used the phone to find out where cops were protecting Jewish neighborhoods just hours before his alleged rampage, which injured five Hanukkah celebrants inside a rabbi’s home on Saturday night.

Thomas filled several pages in his journals with statements that expressed his affinity with the “Black Hebrew Israelite” movement and questioned “why ppl [people] mourned for anti-Semitism when there is Semitic genocide,” according to a criminal complaint filed in White Plains federal court.

In one passage, Thomas stated that “‘Hebrew Israelites’ took from the ‘powerful ppl (ebinoid Israelites),'” which authorities said is an apparent reference to Black Hebrew Israelite, some of whom have been labeled as anti-Semitic, according to the complaint.

Earlier this month, The Post exclusively revealed that the Jersey City killers who gunned down a detective, then slaughtered three people in a kosher market on Dec. 10, had attended services at a reputed Black Hebrew Israelite church in Harlem.

The Israelite Church of God in Jesus Christ, which denies being a Black Hebrew Israelite organization, later said it had “no affiliation whatsoever” with slain killers David Anderson and Francine Graham, and denounced their “unspeakable and deplorable actions.”

Thomas’ journals — which were seized from the home he shares with his mom — also allegedly contain references to “Adolf Hitler” and “Nazi Culture” on the same page as drawings of a Star of David and a swastika.

A search of a cellphone found in Thomas’ car shows he used it to repeatedly search the internet for the phrase “Why did Hitler hate the Jews,” most recently on Dec. 16, and to look up “German Jewish Temples near me” and “Zionist Temples” in Staten Island and Elizabeth, New Jersey, the complaint says.

On Saturday, the phone was also allegedly “used to access an article titled: ‘New York City Increases Police Presence in Jewish Neighborhoods After Possible Anti-Semitic Attacks. Here’s What To Know.'”

Thomas is expected to appear in court in connection with the complaint, which charges him with five counts of federal hate crimes, later Monday.