Mushibugyo or The Insect Magistrate is a Investigation, counter measure and extermination organisation led by Shogun Yoshimune Tokugawa. It was created to protect Edo from giant insects that appeared ten years ago prior the series. It has three divisions, the first is City Patrol (protects the city from insects) then Samurai House Patrol (police and public safety) and the last one is the Shrine and Temple Patrol.
In the 6th year of the Kyouhou era (year 1721), by the order of Tokugawa Yoshimune, the 8th Shogun of the Tokugawa Shogunate of Japan, a "suggestion box" was made for the people so they would know what the people wanted. One of the many suggestions was to create an organisation to protect the people from the insects and thus the Mushibugyo patrol was born.