Query MLB Statcast data using plain English
Statcast MCP Server
A MCP (Model Context Protocol) server that lets you query MLB Statcast data using plain English. Ask your AI assistant about players, games, stats, leaderboards, and more — no coding required.
Built on pybaseball, this server gives AI assistants direct access to data from Baseball Savant, FanGraphs, and Baseball Reference.
What Can You Ask?
Once connected, just talk to your AI assistant naturally:
- "How did Aaron Judge hit in July 2024?"
- "Show me Gerrit Cole's pitch arsenal this season"
- "Who had the highest exit velocity in 2024?"
- "What were the NL standings at the end of 2023?"
- "Find me the most undervalued hitters — compare xBA to actual BA"
- "Expected stats for the whole Yankees lineup and their five starters" (use
expected_stats_batchwith comma-separated names) - "Who are the fastest players in baseball right now?"
- "Show me every pitch from the Yankees-Red Sox game on July 4, 2024"
The AI translates your questions into the right data queries automatically.
Example: Prompt & Response
Here's what a typical exchange looks like when you use the Statcast MCP:
Prompt
"What were Gerrit Cole's arsenal statistics in 2023?"
Response
| Pitch Type | Usage | Pitches | PA | BA | SLG | Whiff% | K% | Run Val/100 |
|---|---|---|---|---|---|---|---|---|
| 4-Seam Fastball | 52.9% | 1,737 | 427 | .202 | .333 | 23.0% | 28.3% | +1.7 |
| Slider | 20.8% | 683 | 175 | .186 | .251 | 32.7% | 29.1% | +1.4 |
| Curveball | 12.1% | 396 | 97 | .215 | .269 | 24.4% | 27.8% | +1.4 |
| Cutter | 7.0% | 231 | 65 | .262 | .377 | 31.1% | 23.1% | +1.6 |
| Changeup | 7.1% | 233 | 54 | .235 | .510 | 28.6% | 13.0% | −1.3 |
His 4-seam fastball was his primary weapon (52.9% usage) with a .202 BA against and +1.7 run value per 100 pitches. The changeup was his only negative pitch (−1.3 run value).
Another prompt
"Who had the highest exit velocity in 2024?"
Response
The AI calls statcast_batter_exitvelo_barrels(year=2024) and returns the leaderboard — Aaron Judge led with a 97.0 mph average exit velocity and 21.8% barrel rate, followed by [other top hitters]...
Available Tools
| Tool | What It Does |
|---|---|
player_lookup |
Find any player's ID, years active, and database links |
statcast_search |
Pitch-by-pitch data for a date range (optionally filtered by team) |
statcast_batter |
Every pitch a specific batter saw in a date range |
statcast_batter_pitch_arsenal |
Batting stats by pitch type (BA, SLG, wOBA vs fastballs, sliders, etc.) |
statcast_pitcher |
Every pitch a specific pitcher threw in a date range |
season_batting_stats |
Full-season batting stats from FanGraphs (AVG, OPS, WAR, wRC+, etc.) |
season_pitching_stats |
Full-season pitching stats from FanGraphs (ERA, FIP, K/9, WAR, etc.) |
team_season_batting_stats |
Team batting — full roster actual stats (FG, or BRef fallback) |
team_season_pitching_stats |
Team pitching — rotation + bullpen actual stats (FG, or BRef fallback) |
statcast_batter_expected_stats |
xBA, xSLG, xwOBA leaderboard — who deserves better stats? |
statcast_pitcher_expected_stats |
Expected stats allowed by pitchers |
expected_stats_batch |
Expected stats for many batters and/or pitchers in one call (lineups, rotations) |
statcast_batter_exitvelo_barrels |
Exit velocity and barrel rate leaders |
statcast_pitcher_exitvelo_barrels |
Exit velocity and barrel rate allowed by pitchers |
statcast_pitcher_pitch_arsenal |
Pitch mix breakdown (% fastball, slider, curve, etc.) |
statcast_pitcher_arsenal_stats |
Performance stats per pitch type (whiff rate, BA against, etc.) |
sprint_speed_leaderboard |
Fastest players in baseball by sprint speed |
team_standings |
Division standings for any season |
batter_percentile_ranks |
Statcast percentile ranks for hitters (exit velo, barrel%, xwOBA, etc.) |
pitcher_percentile_ranks |
Statcast percentile ranks for pitchers (stuff, spin, whiff%, etc.) |
outs_above_average |
Defensive OAA leaderboard by position (SS, CF, ALL, etc.) |
outfield_directional_oaa |
Outfield OAA by direction (back/in, L/R) |
batting_stats_date_range |
Batting stats over any date range (Baseball Reference) |
pitching_stats_date_range |
Pitching stats over any date range (Baseball Reference) |
Team seasons: Use team_season_batting_stats / team_season_pitching_stats with a 3-letter code (PHI, NYY, …) for a full roster’s actual stats (lineup + staff). FanGraphs is tried first; Baseball Reference is used if FG fails or returns nothing.
Player search: Nearly every leaderboard/stat tool a
Tools (24)
player_lookupFind any player's ID, years active, and database linksstatcast_searchPitch-by-pitch data for a date rangestatcast_batterEvery pitch a specific batter saw in a date rangestatcast_batter_pitch_arsenalBatting stats by pitch typestatcast_pitcherEvery pitch a specific pitcher threw in a date rangeseason_batting_statsFull-season batting stats from FanGraphsseason_pitching_statsFull-season pitching stats from FanGraphsteam_season_batting_statsTeam batting full roster actual statsteam_season_pitching_statsTeam pitching rotation and bullpen actual statsstatcast_batter_expected_statsxBA, xSLG, xwOBA leaderboardstatcast_pitcher_expected_statsExpected stats allowed by pitchersexpected_stats_batchExpected stats for many batters and/or pitchers in one callstatcast_batter_exitvelo_barrelsExit velocity and barrel rate leadersstatcast_pitcher_exitvelo_barrelsExit velocity and barrel rate allowed by pitchersstatcast_pitcher_pitch_arsenalPitch mix breakdownstatcast_pitcher_arsenal_statsPerformance stats per pitch typesprint_speed_leaderboardFastest players in baseball by sprint speedteam_standingsDivision standings for any seasonbatter_percentile_ranksStatcast percentile ranks for hitterspitcher_percentile_ranksStatcast percentile ranks for pitchersouts_above_averageDefensive OAA leaderboard by positionoutfield_directional_oaaOutfield OAA by directionbatting_stats_date_rangeBatting stats over any date rangepitching_stats_date_rangePitching stats over any date rangeConfiguration
{"mcpServers": {"statcast": {"command": "npx", "args": ["-y", "@alex-rimerman/statcast-mcp"]}}}