the problem is range and lethality.
swarm boats would have small guided missiles and rockets that have a range of 5+ kilometers and some of them are suicide boats. these boats may be armored to an extent.
a m-240 has a range of 800 meters at the maximum above that you cant expect to hit and destroy something reliably…