Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
machina-sports avatar

Mlb Data

  • 570 installs
  • 201 repo stars
  • Updated August 5, 2026
  • machina-sports/sports-skills

mlb-data is a Claude Code skill that pulls MLB schedules, box scores, play-by-play, and player stats into fantasy, betting research, or editorial baseball products via standardized ingestion recipes.

About

mlb-data is a Machina Sports agent skill from machina-sports/sports-skills for ingesting Major League Baseball data into applications. It provides standardized recipes to fetch schedules, box scores, play-by-play events, and player statistics so fantasy tools, betting research dashboards, or editorial baseball products stay current without hand-rolling MLB API clients. Developers reach for mlb-data when they need repeatable pipelines for game-day updates, historical stat joins, or content feeds grounded in official game data. The skill focuses on ingestion patterns and normalized outputs agents can wire into databases, APIs, or editorial workflows rather than one-off CSV downloads.

  • Schedules, standings, and game metadata
  • Box scores and play-by-play events
  • Player and team season statistics
  • Historical season backfill patterns
  • Fantasy and content-ready export shapes

Mlb Data by the numbers

  • 570 all-time installs (skills.sh)
  • +9 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #421 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/machina-sports/sports-skills --skill mlb-data

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs570
repo stars201
Last updatedAugust 5, 2026
Repositorymachina-sports/sports-skills

How do you ingest MLB schedules and box scores into an app?

Pull MLB schedules, box scores, play-by-play, and player stats into fantasy, betting research, or editorial baseball products via standardized ingestion recipes.

Who is it for?

Developers building fantasy baseball, betting research, or sports editorial tools who need repeatable MLB schedule, box score, and play-by-play ingestion.

Skip if: Products covering non-MLB leagues only or teams that need live broadcast rights and video pipelines instead of structured game and player statistics.

When should I use this skill?

A developer asks to fetch MLB schedules, box scores, play-by-play, player stats, or standardized baseball data ingestion for an app.

What you get

Structured MLB schedule, box score, play-by-play, and player stat datasets ready for fantasy, betting, or editorial product pipelines.

  • MLB schedule datasets
  • Box score and play-by-play extracts

Files

SKILL.mdMarkdownGitHub ↗

MLB Data

Before writing queries, consult references/api-reference.md for endpoints, ID conventions, and data shapes.

Setup

Before first use, check if the CLI is available:

which sports-skills || pip install sports-skills

If pip install fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:

python3 --version  # check version
# If < 3.10, try: python3.12 -m pip install sports-skills
# On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills

No API keys required.

Quick Start

Prefer the CLI — it avoids Python import path issues:

sports-skills mlb get_scoreboard
sports-skills mlb get_standings --season=2025
sports-skills mlb get_teams

CRITICAL: Before Any Query

CRITICAL: Before calling any data endpoint, verify:

  • Season year is derived from the system prompt's currentDate — never hardcoded.
  • If only a team name is provided, call get_teams to resolve the team ID before using team-specific commands.

Choosing the Season

Derive the active season from the system prompt's date — not just the calendar year.

  • If the user specifies a season, use it as-is.
  • If the user says "current", "this season", or doesn't specify: The MLB season runs late March/April through October. If the current month is January–March, the last completed season was the prior calendar year. From April onward, use the current calendar year.

Commands

CommandDescription
get_scoreboardLive/recent MLB scores
get_standingsStandings by league and division
get_teamsAll 30 MLB teams
get_team_rosterFull roster for a team
get_team_scheduleSchedule for a specific team
get_game_summaryDetailed box score and scoring plays
get_leadersMLB statistical leaders
get_newsMLB news articles
get_play_by_playFull play-by-play for a game
get_win_probabilityWin probability chart data
get_scheduleSchedule for a specific date or season
get_injuriesInjury reports across all teams
get_transactionsRecent transactions
get_depth_chartDepth chart for a team
get_team_statsTeam statistical profile
get_player_statsPlayer statistical profile

See references/api-reference.md for full parameter lists and return shapes.

Examples

Example 1: Today's scores User says: "What are today's MLB scores?" Actions: 1. Call get_scoreboard() Result: All live and recent MLB games with scores by inning and status

Example 2: Division standings User says: "Show me the AL East standings" Actions: 1. Derive season year from currentDate 2. Call get_standings(season=<derived_year>) 3. Filter results for American League East Result: AL East standings with W-L, PCT, GB, run differential

Example 3: Team roster User says: "Who's on the Yankees roster?" Actions: 1. Call get_team_roster(team_id="10") Result: Full Yankees roster with name, position, bats/throws, height, weight

Example 4: Game box score User says: "Show me the full box score for last night's Dodgers game" Actions: 1. Call get_scoreboard(date="<yesterday>") to find the event_id 2. Call get_game_summary(event_id=<id>) for full box score Result: Complete box score with batting/pitching stats per player

Example 5: Injury report User says: "Who's on the IL for the Yankees?" Actions: 1. Call get_injuries() 2. Filter results for New York Yankees (team_id=10) Result: Yankees IL list with player name, position, IL type, and injury detail

Example 6: Player statistics User says: "Show me Shohei Ohtani's stats" Actions: 1. Derive season year from currentDate 2. Call get_player_stats(player_id="39832", season_year=<derived_year>) Result: Season stats by category (batting, pitching) with value, rank, and per-game averages

Commands that DO NOT exist — never call these

  • ~~get_odds~~ / ~~get_betting_odds~~ — not available. For prediction market odds, use the polymarket or kalshi skill.
  • ~~search_teams~~ — does not exist. Use get_teams instead.
  • ~~get_box_score~~ — does not exist. Use get_game_summary instead.
  • ~~get_player_ratings~~ — does not exist. Use get_player_stats instead.

If a command is not listed in the Commands table above, it does not exist.

Error Handling

When a command fails, do not surface raw errors to the user. Instead: 1. Catch silently and try alternatives 2. If team name given instead of ID, use get_teams to find the ID first 3. Only report failure with a clean message after exhausting alternatives

Troubleshooting

Error: sports-skills command not found Cause: Package not installed Solution: Run pip install sports-skills

Error: Team not found by ID Cause: Wrong or outdated ESPN team ID used Solution: Call get_teams to get the current list of all 30 MLB teams with their IDs

Error: No data returned for a future game Cause: ESPN only returns data for completed or in-progress games Solution: Use get_schedule to see upcoming game details; get_scoreboard only covers active/recent games

Error: Offseason — scoreboard returns 0 events Cause: No games scheduled during the offseason (November–March) Solution: Use get_standings or get_news instead; MLB offseason transactions are available via get_transactions

Related skills

How it compares

Use mlb-data when you need opinionated MLB ingestion recipes; build custom clients when you only need a single endpoint and will not reuse sports pipeline patterns.

FAQ

What MLB data does mlb-data ingest?

mlb-data ingests MLB schedules, box scores, play-by-play sequences, and player statistics through standardized recipes. Outputs feed fantasy platforms, betting research tools, and editorial baseball products that need structured game and player feeds.

Who is mlb-data designed for?

mlb-data targets developers building fantasy baseball, betting research, or editorial baseball experiences. It emphasizes repeatable ingestion pipelines instead of manual exports or ad hoc API scripts per feature.

Does mlb-data handle non-MLB sports?

mlb-data focuses on Major League Baseball datasets—schedules, box scores, play-by-play, and player stats. Other leagues require different Machina Sports skills or custom ingestion outside this MLB scope.

Data Science & MLanalyticspipelines

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.