
Connects Claude to official MLB statistics through eight core operations: pull game schedules and live feeds, check standings, grab team rosters and profiles, look up player stats and bios, and fetch full box scores for any game. Useful when you're building baseball analytics, need real-time game data for a chatbot, or want to answer stats questions without scraping. Part of the Pipeworx gateway, so you can either use it standalone or get it bundled with 673+ other data sources. Supports a natural language query mode that picks the right API call based on your question instead of making you specify tools manually.
Public tool metadata for what this MCP can expose to an agent.
get_stats2 paramsendpointstringparamsobjectget_scheduleGet list of games for a given date/range and/or team/opponent.9 paramsGet list of games for a given date/range and/or team/opponent.
datevalueend_datevaluegame_idvalueinclude_series_statusbooleanopponent_idvalueseasonvaluesport_idintegerstart_datevalueteam_idvalueget_player_statsReturns a list of current season or career stat data for a given player.4 paramsReturns a list of current season or career stat data for a given player.
groupstringplayer_idintegerseasonvaluestatsstringget_standingsReturns a dict of standings data for a given league/division and season.4 paramsReturns a dict of standings data for a given league/division and season.
division_idvalueleague_idvalueseasonvaluestandings_typesstringget_team_leadersReturns a python list of stat leader data for a given team5 paramsReturns a python list of stat leader data for a given team
leader_categorystringleader_game_typestringlimitvalueseasonvalueteam_idintegerlookup_playerGet data about players based on first, last, or full name.1 paramsGet data about players based on first, last, or full name.
namestringget_boxscoreGet a formatted boxscore for a given game.2 paramsGet a formatted boxscore for a given game.
game_idintegertimecodevalueget_team_rosterGet the roster for a given team.4 paramsGet the roster for a given team.
datevalueroster_typestringseasonintegerteam_idintegerget_game_paceReturns data about pace of game for a given season (back to 1999).1 paramsReturns data about pace of game for a given season (back to 1999).
seasonvalueget_metaGet available values from StatsAPI for use in other queries, or look up descriptions for values found in API results. For example, to get a list of leader categories to use when calling team_leaders(): statsapi.meta('leagueLeaderTypes')2 paramsGet available values from StatsAPI for use in other queries, or look up descriptions for values found in API results. For example, to get a list of leader categories to use when calling team_leaders(): statsapi.meta('leagueLeaderTypes')
fieldsvaluetype_namestringget_available_endpointsGet MLB StatsAPI endpoints directlyGet MLB StatsAPI endpoints directly
No parameter schema in public metadata yet.
get_notesGet additional notes on an endpoint1 paramsGet additional notes on an endpoint
endpointstringget_game_scoring_play_dataReturns a dictionary of scoring plays for a given game containing 3 keys: * home - home team data * away - away team data * plays - sorted list of scoring play data1 paramsReturns a dictionary of scoring plays for a given game containing 3 keys: * home - home team data * away - away team data * plays - sorted list of scoring play data
game_idintegerget_last_gameGet the gamePk (game_id) for the given team's most recent completed game.1 paramsGet the gamePk (game_id) for the given team's most recent completed game.
team_idintegerget_league_leader_dataReturns a list of stat leaders overall or for a given league (103=AL, 104=NL).6 paramsReturns a list of stat leaders overall or for a given league (103=AL, 104=NL).
game_typesvalueleader_categoriesstringleague_idvaluelimitvalueseasonvaluestat_groupvalueget_linescoreGet formatted linescore data for a specific MLB game.1 paramsGet formatted linescore data for a specific MLB game.
game_idintegerget_next_gameGet the game ID for a team's next scheduled game.1 paramsGet the game ID for a team's next scheduled game.
team_idintegerget_game_highlight_dataReturns a list of highlight data for a given game.1 paramsReturns a list of highlight data for a given game.
game_idintegerget_statcast_dataPulls statcast play-level data from Baseball Savant for a given date range. INPUTS: start_dt: YYYY-MM-DD : the first date for which you want statcast data end_dt: YYYY-MM-DD : the last date for which you want statcast data team: optional (defaults to None) : city abbreviation...7 paramsPulls statcast play-level data from Baseball Savant for a given date range. INPUTS: start_dt: YYYY-MM-DD : the first date for which you want statcast data end_dt: YYYY-MM-DD : the last date for which you want statcast data team: optional (defaults to None) : city abbreviation...
end_dtvalueend_rowvalueparallelbooleanstart_dtvaluestart_rowvalueteamvalueverbosebooleanget_statcast_batter_dataPulls statcast pitch-level data from Baseball Savant for a given batter. ARGUMENTS start_dt : YYYY-MM-DD : the first date for which you want a player's statcast data end_dt : YYYY-MM-DD : the final date for which you want data player_id : INT : the player's MLBAM ID. Find this...5 paramsPulls statcast pitch-level data from Baseball Savant for a given batter. ARGUMENTS start_dt : YYYY-MM-DD : the first date for which you want a player's statcast data end_dt : YYYY-MM-DD : the final date for which you want data player_id : INT : the player's MLBAM ID. Find this...
end_dtvalueend_rowvalueplayer_idintegerstart_dtvaluestart_rowvalueget_statcast_pitcher_dataPulls statcast pitch-level data from Baseball Savant for a given pitcher. ARGUMENTS start_dt : YYYY-MM-DD : the first date for which you want a player's statcast data end_dt : YYYY-MM-DD : the final date for which you want data player_id : INT : the player's MLBAM ID. Find thi...5 paramsPulls statcast pitch-level data from Baseball Savant for a given pitcher. ARGUMENTS start_dt : YYYY-MM-DD : the first date for which you want a player's statcast data end_dt : YYYY-MM-DD : the final date for which you want data player_id : INT : the player's MLBAM ID. Find thi...
end_dtvalueend_rowvalueplayer_idintegerstart_dtvaluestart_rowvalueget_statcast_batter_exitvelo_barrelsRetrieves batted ball data for all batters in a given year. ARGUMENTS year: The year for which you wish to retrieve batted ball data. Format: YYYY. minBBE: The minimum number of batted ball events for each player. If a player falls below this threshold, they will be excluded f...4 paramsRetrieves batted ball data for all batters in a given year. ARGUMENTS year: The year for which you wish to retrieve batted ball data. Format: YYYY. minBBE: The minimum number of batted ball events for each player. If a player falls below this threshold, they will be excluded f...
end_rowvalueminBBEvaluestart_rowvalueyearintegerget_statcast_pitcher_exitvelo_barrelsRetrieves batted ball against data for all qualified pitchers in a given year. ARGUMENTS year: The year for which you wish to retrieve batted ball against data. Format: YYYY. minBBE: The minimum number of batted ball against events for each pitcher. If a player falls below thi...4 paramsRetrieves batted ball against data for all qualified pitchers in a given year. ARGUMENTS year: The year for which you wish to retrieve batted ball against data. Format: YYYY. minBBE: The minimum number of batted ball against events for each pitcher. If a player falls below thi...
end_rowvalueminBBEvaluestart_rowvalueyearintegerget_statcast_batter_expected_statsRetrieves expected stats based on quality of batted ball contact in a given year. ARGUMENTS year: The year for which you wish to retrieve expected stats data. Format: YYYY. minPA: The minimum number of plate appearances for each player. If a player falls below this threshold,...4 paramsRetrieves expected stats based on quality of batted ball contact in a given year. ARGUMENTS year: The year for which you wish to retrieve expected stats data. Format: YYYY. minPA: The minimum number of plate appearances for each player. If a player falls below this threshold,...
end_rowvalueminPAvaluestart_rowvalueyearintegerget_statcast_pitcher_expected_statsRetrieves expected stats based on quality of batted ball contact against in a given year. ARGUMENTS year: The year for which you wish to retrieve expected stats data. Format: YYYY. minPA: The minimum number of plate appearances against for each pitcher. If a player falls below...4 paramsRetrieves expected stats based on quality of batted ball contact against in a given year. ARGUMENTS year: The year for which you wish to retrieve expected stats data. Format: YYYY. minPA: The minimum number of plate appearances against for each pitcher. If a player falls below...
end_rowvalueminPAvaluestart_rowvalueyearintegerget_statcast_batter_percentile_ranksRetrieves percentile ranks for batters in a given year. ARGUMENTS year: The year for which you wish to retrieve percentile data. Format: YYYY. start_row: optional (defaults to None) : starting row index for truncating large results (0-based, inclusive) end_row: optional (defau...3 paramsRetrieves percentile ranks for batters in a given year. ARGUMENTS year: The year for which you wish to retrieve percentile data. Format: YYYY. start_row: optional (defaults to None) : starting row index for truncating large results (0-based, inclusive) end_row: optional (defau...
end_rowvaluestart_rowvalueyearintegerget_statcast_pitcher_percentile_ranksRetrieves percentile ranks for each player in a given year, including batters with 2.1 PA per team game and 1.25 for pitchers. It includes percentiles on expected stats, batted ball data, and spin rates, among others. ARGUMENTS year: The year for which you wish to retrieve per...3 paramsRetrieves percentile ranks for each player in a given year, including batters with 2.1 PA per team game and 1.25 for pitchers. It includes percentiles on expected stats, batted ball data, and spin rates, among others. ARGUMENTS year: The year for which you wish to retrieve per...
end_rowvaluestart_rowvalueyearintegerget_statcast_batter_pitch_arsenalRetrieves outcome data for batters split by the pitch type in a given year. ARGUMENTS year: The year for which you wish to retrieve pitch arsenal data. Format: YYYY. minPA: The minimum number of plate appearances for each player. If a player falls below this threshold, they wi...4 paramsRetrieves outcome data for batters split by the pitch type in a given year. ARGUMENTS year: The year for which you wish to retrieve pitch arsenal data. Format: YYYY. minPA: The minimum number of plate appearances for each player. If a player falls below this threshold, they wi...
end_rowvalueminPAintegerstart_rowvalueyearintegerget_statcast_pitcher_pitch_arsenalRetrieves high level stats on each pitcher's arsenal in a given year. ARGUMENTS year: The year for which you wish to retrieve expected stats data. Format: YYYY. minP: The minimum number of pitches thrown. If a player falls below this threshold, they will be excluded from the r...5 paramsRetrieves high level stats on each pitcher's arsenal in a given year. ARGUMENTS year: The year for which you wish to retrieve expected stats data. Format: YYYY. minP: The minimum number of pitches thrown. If a player falls below this threshold, they will be excluded from the r...
arsenal_typestringend_rowvalueminPvaluestart_rowvalueyearintegerget_statcast_single_gamePulls statcast play-level data from Baseball Savant for a single game, identified by its MLB game ID (game_pk in statcast data) INPUTS: game_pk : 6-digit integer MLB game ID to retrieve start_row: optional (defaults to None) : starting row index for truncating large results (0...3 paramsPulls statcast play-level data from Baseball Savant for a single game, identified by its MLB game ID (game_pk in statcast data) INPUTS: game_pk : 6-digit integer MLB game ID to retrieve start_row: optional (defaults to None) : starting row index for truncating large results (0...
end_rowvaluegame_pkintegerstart_rowvaluecreate_strike_zone_plotProduces a pitches overlaid on a strike zone using StatCast data Args: data: (pandas.DataFrame) StatCast pandas.DataFrame of StatCast pitcher data title: (str), default = '' Optional: Title of plot colorby: (str), default = 'pitch_type' Optional: Which category to color the ma...5 paramsProduces a pitches overlaid on a strike zone using StatCast data Args: data: (pandas.DataFrame) StatCast pandas.DataFrame of StatCast pitcher data title: (str), default = '' Optional: Title of plot colorby: (str), default = 'pitch_type' Optional: Which category to color the ma...
annotationstringcolorbystringdataobjectlegend_titlestringtitlestringcreate_spraychart_plotProduces a spraychart using statcast data overlayed on specified stadium Args: data: (pandas.DataFrame) StatCast pandas.DataFrame of StatCast batter data team_stadium: (str) Team whose stadium the hits will be overlaid on title: (str), default = '' Optional: Title of plot size...8 paramsProduces a spraychart using statcast data overlayed on specified stadium Args: data: (pandas.DataFrame) StatCast pandas.DataFrame of StatCast batter data team_stadium: (str) Team whose stadium the hits will be overlaid on title: (str), default = '' Optional: Title of plot size...
colorbystringdataobjectheightintegerlegend_titlestringsizeintegerteam_stadiumstringtitlestringwidthintegercreate_bb_profile_plotPlots a given StatCast parameter split by bb_type Args: df: (pandas.DataFrame) pandas.DataFrame of StatCast batter data (retrieved through statcast, statcast_batter, etc) parameter: (str), default = 'launch_angle' Optional: Parameter to plot2 paramsPlots a given StatCast parameter split by bb_type Args: df: (pandas.DataFrame) pandas.DataFrame of StatCast batter data (retrieved through statcast, statcast_batter, etc) parameter: (str), default = 'launch_angle' Optional: Parameter to plot
dataobjectparameterstringcreate_teams_plotPlots a scatter plot with each MLB team Args: data: (pandas.DataFrame) pandas.DataFrame of Fangraphs team data (retrieved through team_batting or team_pitching) x_axis: (str) Stat name to be plotted as the x_axis of the chart y_axis: (str) Stat name to be plotted as the y_axis...4 paramsPlots a scatter plot with each MLB team Args: data: (pandas.DataFrame) pandas.DataFrame of Fangraphs team data (retrieved through team_batting or team_pitching) x_axis: (str) Stat name to be plotted as the x_axis of the chart y_axis: (str) Stat name to be plotted as the y_axis...
dataobjecttitlevaluex_axisstringy_axisstringget_pitching_stats_brefGet all pitching stats for a set season. If no argument is supplied, gives stats for current season to date.1 paramsGet all pitching stats for a set season. If no argument is supplied, gives stats for current season to date.
seasonvalueget_pitching_stats_rangeGet all pitching stats for a set time range. This can be the past week, the month of August, anything. Just supply the start and end date in YYYY-MM-DD format.2 paramsGet all pitching stats for a set time range. This can be the past week, the month of August, anything. Just supply the start and end date in YYYY-MM-DD format.
end_dtvaluestart_dtstringget_pitching_statsGet season-level pitching data from FanGraphs. Args: start_season: First season to retrieve data from end_season: Final season to retrieve data from. If None, returns only start_season. league: Either "all", "nl", "al", or "mnl" qual: Minimum number of plate appearances to be...5 paramsGet season-level pitching data from FanGraphs. Args: start_season: First season to retrieve data from end_season: Final season to retrieve data from. If None, returns only start_season. league: Either "all", "nl", "al", or "mnl" qual: Minimum number of plate appearances to be...
end_seasonvalueindintegerleaguestringqualvaluestart_seasonintegerget_playerid_lookupLookup playerIDs (MLB AM, bbref, retrosheet, FG) for a given player Args: last (str, required): Player's last name. first (str, optional): Player's first name. Defaults to None. fuzzy (bool, optional): In case of typos, returns players with names close to input. Defaults to Fa...3 paramsLookup playerIDs (MLB AM, bbref, retrosheet, FG) for a given player Args: last (str, required): Player's last name. first (str, optional): Player's first name. Defaults to None. fuzzy (bool, optional): In case of typos, returns players with names close to input. Defaults to Fa...
firstvaluefuzzybooleanlaststringreverse_lookup_playerRetrieve a table of player information given a list of player ids :param player_ids: list of player ids :type player_ids: list :param key_type: name of the key type being looked up (one of "mlbam", "retro", "bbref", or "fangraphs") :type key_type: str :rtype: :class:`pandas.co...2 paramsRetrieve a table of player information given a list of player ids :param player_ids: list of player ids :type player_ids: list :param key_type: name of the key type being looked up (one of "mlbam", "retro", "bbref", or "fangraphs") :type key_type: str :rtype: :class:`pandas.co...
key_typestringplayer_idsarrayget_schedule_and_recordRetrieve a team's game-level results for a given season, including win/loss/tie result, score, attendance, and winning/losing/saving pitcher. If the season is incomplete, it will provide scheduling information for future games. ARGUMENTS season: Integer. The season for which y...2 paramsRetrieve a team's game-level results for a given season, including win/loss/tie result, score, attendance, and winning/losing/saving pitcher. If the season is incomplete, it will provide scheduling information for future games. ARGUMENTS season: Integer. The season for which y...
seasonintegerteamstringget_player_splitsReturns a dataframe of all split stats for a given player. If player_info is True, this will also return a dictionary that includes player position, handedness, height, weight, position, and team4 paramsReturns a dataframe of all split stats for a given player. If player_info is True, this will also return a dictionary that includes player position, handedness, height, weight, position, and team
pitching_splitsbooleanplayer_infobooleanplayeridstringyearvalueget_pybaseball_standingsReturns a pandas DataFrame of the standings for a given MLB season, or the most recent standings if the date is not specified. ARGUMENTS season (int): the year of the season1 paramsReturns a pandas DataFrame of the standings for a given MLB season, or the most recent standings if the date is not specified. ARGUMENTS season (int): the year of the season
seasonvalueget_team_battingGet season-level Batting Statistics for Specific Team (from Baseball-Reference) ARGUMENTS: team : str : The Team Abbreviation (i.e. 'NYY' for Yankees) of the Team you want data for start_season : int : first season you want data for (or the only season if you do not specify an...4 paramsGet season-level Batting Statistics for Specific Team (from Baseball-Reference) ARGUMENTS: team : str : The Team Abbreviation (i.e. 'NYY' for Yankees) of the Team you want data for start_season : int : first season you want data for (or the only season if you do not specify an...
end_seasonvalueindintegerleaguestringstart_seasonintegerget_team_fieldingGet season-level Fielding Statistics for Specific Team (from Baseball-Reference) ARGUMENTS: team : str : The Team Abbreviation (i.e., 'NYY' for Yankees) of the Team you want data for start_season : int : first season you want data for (or the only season if you do not specify...4 paramsGet season-level Fielding Statistics for Specific Team (from Baseball-Reference) ARGUMENTS: team : str : The Team Abbreviation (i.e., 'NYY' for Yankees) of the Team you want data for start_season : int : first season you want data for (or the only season if you do not specify...
end_seasonvalueindintegerleaguestringstart_seasonintegerget_team_pitchingGet season-level Pitching Statistics for Specific Team (from Baseball-Reference) ARGUMENTS: team : str : The Team Abbreviation (i.e. 'NYY' for Yankees) of the Team you want data for start_season : int : first season you want data for (or the only season if you do not specify a...4 paramsGet season-level Pitching Statistics for Specific Team (from Baseball-Reference) ARGUMENTS: team : str : The Team Abbreviation (i.e. 'NYY' for Yankees) of the Team you want data for start_season : int : first season you want data for (or the only season if you do not specify a...
end_seasonvalueindintegerleaguestringstart_seasonintegerget_top_prospectsRetrieves the top prospects by team or leaguewide. It can return top prospect pitchers, batters, or both. ARGUMENTS team: The team name for which you wish to retrieve top prospects. If not specified, the function will return leaguewide top prospects. playerType: Either "pitche...2 paramsRetrieves the top prospects by team or leaguewide. It can return top prospect pitchers, batters, or both. ARGUMENTS team: The team name for which you wish to retrieve top prospects. If not specified, the function will return leaguewide top prospects. playerType: Either "pitche...
player_typevalueteamvalueMLB Stats API MCP — official MLB statistics: schedules, scores, rosters, player stats, standings, box scores. No auth.
Part of Pipeworx — an MCP gateway connecting AI agents to 1476+ live data sources.
schedule(date?, season?, team_id?, sport_id?) — game schedule by date / seasonstandings(league_id?, season?, date?) — current/historic standingsget_team(team_id) — team profileteam_roster(team_id, roster_type?, season?) — players on a teamget_player(player_id) — player profileplayer_stats(player_id, group?, season?, stats?) — career or season statsget_boxscore(game_pk) — full game box scoreget_game_feed(game_pk) — live game feed (play-by-play)https://statsapi.mlb.com/api/v1/ — public, used by MLB.com itself.
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"mlb-stats": {
"url": "https://gateway.pipeworx.io/mlb-stats/mcp"
}
}
}
tools/list at https://gateway.pipeworx.io/mlb-stats/mcp returns the tools in the table
above plus the shared Pipeworx meta-tools — ask_pipeworx,
discover_tools, search_within, remember/recall and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's initialize response states its exact scope, and
is the authoritative answer for a given day.
This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
ask_pipeworx, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.
Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}
Both URLs reach the same gateway and the same 1476+ data sources. The
only difference is which pack's tools are listed directly; ask_pipeworx
reaches all of them from either one.
Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:
ask_pipeworx({ question: "your question about Mlb Stats data" })
The gateway picks the right tool and fills the arguments automatically.
MIT