On July 3 Governor Charlie Baker signed the “Red Flags” legislation, under which judges can order people they find are at risk for violence against themselves or others to surrender their weapons.
Here are links to the session law and a Boston Globe article about it.
https://malegislature.gov/Laws/SessionLaws/Acts/2018/Chapter123
https://www.bostonglobe.com/metro/2018/07/03/baker-signs-red-flag-gun-bill-into-law/SqiPzGFWjxHLcZWqnxMGRJ/story.html
Social Law Library resources include:
Law Enforcement Guide to Firearms Law http://encore.socialaw.com/iii/encore/record/C__Rb1145961
Mental Health Proceedings in Massachusetts http://encore.socialaw.com/iii/encore/record/C__Rb1141228