BOSTON — The Massachusetts Legislature was poised Monday to approve a bill that would tax and regulate short-term rentals, including those offered by Airbnb and other online platforms, as lawmakers hurtled toward the end of the formal legislative session.

After weeks of negotiations, House and Senate lawmakers reached agreement on the compromise bill over the weekend. It called for extending the state’s current 5.7 percent hotel tax to most short-term rentals and giving cities and towns the option of tacking on an additional 6 percent to the tax; 9 percent if an owner rents out two or more units in the same community.

The measure is one of several awaiting action before a Tuesday midnight deadline for completing work on major legislation. Under legislative rules, the House and Senate can continue to meet informally after July 31, but only to take up uncontroversial items.

The Senate on Monday unanimously approved a compromise version of a new voter registration system that would automatically update the registration status of voters when they interact with the Registry of Motor Vehicles or other state agencies. The bill has also cleared the House and is expected to land on Republican Gov. Charlie Baker’s desk shortly.

“We should do everything we can to make it easier for people to vote,” said Democratic Sen. Cynthia Creem, of Newton, who worked on the final version of the bill.

As the clock ticked down toward adjournment, behind-the-scenes negotiations were believed to be continuing at the Statehouse on a major health care bill that sought to reduce price disparities between large teaching hospitals and smaller community hospitals around the state that are struggling to keep pace.

Among other measures hanging in the balance: a major economic development bill that includes a proposed sales tax holiday for the weekend of Aug. 11-12; a bill to expand access to addiction treatment; proposals to increase the supply of clean energy in the state; and a measure that would revamp the formula the state uses for providing direct assistance to public school districts.