The Mets already have clinched homefield advantage in the NL for both rounds.
San Diego has a magic number of 6 against St. Louis to clinch home field, although the Padres will probably win any tiebreaker against the Cardinals unless they get swept. The Padres have won 2 of 3 already against St. Louis and they hold the edge in the second tiebreaker which is intradivisional games. The Cardinals actually have a losing record against teams in their own division (37-40).
In the AL, the Tigers lead the Yankees by 1/2 game and the teams are tied in the AILC (all important loss column). The Yankees hold a tiebreaker edge over the Tigers so the Yankees magic number to clinch homefield throughout the postseason is 7. For Detroit, it is also 7.
Oakland lost the season series to Detroit, but won the season series against the Yankees. For Oakland to get home field against Detroit, their magic number is 11. Against New York, it is 10.