BOSTON — Massachusetts Attorney General Andrea Campbell filed a lawsuit Thursday morning against nine towns out of compliance with the MBTA Communities Law.