Consulting firm McKinsey & Co has agreed to pay $230 million to resolve lawsuits by hundreds of U.S. local governments and school districts alleging it fueled an epidemic of opioid addiction through its work for bankrupt OxyContin maker Purdue Pharma and other drug companies.