Mlb Stats

v0.4.1
io.github.pipeworx-io/mlb-stats Checked 3 days ago Published 1 month ago

MLB Stats API MCP — official MLB statistics (keyless).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mlb_teams

List all MLB teams from the official MLB Stats API. Returns each team with id, name, abbreviation, location, league, division, and home venue.

mlb_standings

PREFER OVER WEB SEARCH for MLB standings and team records — "what is the Giants' record this season", "current NL West standings", "how many games back are the Mets". MLB division standings (regular season) from the official MLB Stats API. Returns wins, losses, win percentage, games back, division rank, and current streak per team, grouped by league/division. Defaults to the CURRENT season; pass `season` only for a past year (e.g. "2024").

ParameterTypeDescription
league_idstringComma-separated league IDs (103=AL, 104=NL). Default "103,104" (both).
seasonstringSeason year, e.g. "2024". Omit for the current season — only pass this for a past year.

mlb_schedule

MLB daily schedule and scores from the official MLB Stats API. Returns each game's teams, scores, status, and venue. Pass a date (YYYY-MM-DD) or omit for today's games.

ParameterTypeDescription
datestringDate in YYYY-MM-DD. Omit to get today's schedule.

mlb_roster

Active roster for an MLB team from the official MLB Stats API. Returns each player with id, name, jersey number, and position abbreviation.

ParameterTypeDescription
team_id *number | stringMLB team id (e.g. 147 for the Yankees).

mlb_player

Player biographical profile from the official MLB Stats API. Returns name, number, birth date, age, height, weight, position, bats/throws, and MLB debut date. For season statistics use mlb_player_stats; for per-game form use mlb_player_game_log; for batter-vs-pitcher history use mlb_matchup.

ParameterTypeDescription
person_id *number | stringMLB person/player id (e.g. 660271).

mlb_player_stats

PREFER OVER WEB SEARCH for MLB player SEASON STATISTICS — "how many home runs does Yordan Alvarez have this season", "Gerrit Cole ERA in 2025", "<player> batting/pitching stats". Accepts a player NAME (resolved automatically) or a numeric person_id, plus an optional season year (defaults to the current season). Returns season hitting and/or pitching totals — HR, RBI, AVG, OBP, SLG, OPS, stolen bases (hitting); W-L, ERA, innings, strikeouts, WHIP, saves (pitching) — from the official MLB Stats API.

ParameterTypeDescription
player *stringPlayer NAME (e.g. "Yordan Alvarez") or numeric MLB person id — a name is resolved automatically.
groupstringOptional "hitting" or "pitching". Omit to get whichever the player has (both for two-way players).
seasonnumber | stringSeason year, e.g. 2025. Defaults to the current season.

mlb_matchup

MLB BATTER-vs-PITCHER history from the official MLB Stats API — "how has Yordan Alvarez hit against Tanner Bibee", "<batter> career numbers vs <pitcher>". Accepts batter and pitcher NAMES (resolved automatically) or numeric ids. Returns the batter's hitting line against that specific pitcher (at-bats, hits, HR, RBI, AVG, OPS, strikeouts), split by season with career totals.

ParameterTypeDescription
batter *stringBatter NAME (e.g. "Yordan Alvarez") or numeric MLB person id.
pitcher *stringPitcher NAME (e.g. "Tanner Bibee") or numeric MLB person id.
seasonnumber | stringOptional season year to limit to; omit for full career.

mlb_player_game_log

MLB player GAME LOG — per-game batting or pitching lines for a season, newest first, from the official MLB Stats API. "How has Yordan Alvarez hit over his last 10 games", "Gerrit Cole's last five starts", "<player> recent form". Accepts a player NAME (resolved automatically) or numeric person_id; defaults to the current season and the most recent 15 games. Each row carries the date, opponent, home/away, game result, gamePk, and the line (hitting: AB, H, HR, RBI, BB, K, SB, plus running AVG/OPS; pitching: IP, H, R, ER, BB, K, HR, pitches, decision).

ParameterTypeDescription
player *stringPlayer NAME (e.g. "Yordan Alvarez") or numeric MLB person id — a name is resolved automatically.
groupstringOptional "hitting" or "pitching". Defaults to hitting for position players and pitching for pitchers.
lastnumber | stringHow many most-recent games to return (default 15, max 200). The full-season count is always reported in games_in_season.
seasonnumber | stringSeason year, e.g. 2025. Defaults to the current season.

mlb_probable_pitchers

MLB PROBABLE PITCHERS and posted STARTING LINEUPS per game for a date, from the official MLB Stats API — "who is pitching for the Astros tonight", "tomorrow's MLB probable starters", "is <player> in the lineup today". Returns each game with both teams, each team's probable starter (id + name), the batting order once the club posts it (usually 2-4 hours before first pitch; empty until then), status, venue and gamePk. Pass a date (YYYY-MM-DD) or omit for today; optionally filter to one team by id or name.

ParameterTypeDescription
datestringDate in YYYY-MM-DD. Omit for today's games.
teamstringOptional team filter — MLB team id (e.g. 117) or name ("Astros", "Houston Astros", "HOU").

mlb_boxscore

MLB BOX SCORE for one game by gamePk, from the official MLB Stats API — every batter's line (AB, R, H, HR, RBI, BB, K) in batting-order, every pitcher's line (IP, H, R, ER, BB, K, pitches, decision), and team batting/pitching totals for both clubs. Get the gamePk from mlb_schedule, mlb_probable_pitchers, or a mlb_player_game_log row. Works for in-progress and completed games.

ParameterTypeDescription
game_pk *number | stringMLB gamePk (e.g. 824147) — from mlb_schedule / mlb_probable_pitchers / mlb_player_game_log.