MLB Stats API

MLB Stats API

Official MLB Stats API data, no API key: schedules and live games, box scores, line scores, play by play, teams, rosters, standings, players, stats, league leaders and transactions for MLB and the minor leagues. Personal, non-commercial use under MLB's terms.

7 日間無料 · クレジットカード不要 · EU ホスト

MLB に何でも聞ける

AnythingMCP 経由で MLB Stats API に実際のプロンプトを試そう — Claude がツールを呼び出し、回答します。あなたのメッセージで Enter を押すと Cloud にインストールします。

MLB を Cloud にインストール
MLB Stats API · MCP 経由でライブ
共有
Opus 4.7

Claude は AI のため誤ることがあります。回答をご確認ください。

2 分でセットアップ

  1. 1cloud.anythingmcp.com で無料トライアル開始。
  2. 2コネクターストアで MLB Stats API をクリック。資格情報を貼り付け。
  3. 3MCP API キーを発行し、AI クライアントを MCP URL に向ける。
MLB Stats API を今すぐインストール

MLB のガイド

主要 AI クライアント向けのステップバイステップセットアップ。

MLB Stats API のセットアップ

コネクタ定義そのものから:認証情報の入手先、必要な権限、このアダプタが呼び出す API。 コネクタ作者により英語で提供されています。

MLB Stats API

This connector reads the MLB Stats API (https://statsapi.mlb.com), the public data feed behind MLB.com and the MLB app: schedules and live games, box scores, line scores, play by play, teams, rosters, standings, players, stats, league leaders and transactions. MLB and the minor leagues are covered. No API key is needed and every tool only reads.

Terms of use. The data belongs to MLB Advanced Media; every answer carries MLB's copyright notice (http://gdx.mlb.com/components/copyright.txt). MLB allows individual, non-commercial, non-bulk use. Do not build a commercial product or a bulk export on this connector: license the data from MLB or a sports data provider for that. MLB publishes no SLA or rate limit, so keep calls few and do not poll a live game every few seconds.

Network. MLB's servers refuse many requests from datacenter addresses with HTTP 406 Not Acceptable, while the same request from a home or office connection works. Every tool here therefore goes through the instance proxy when one is configured (on AnythingMCP Cloud it is, with an hourly cap per workspace). A self-hosted instance without a proxy works when its server is not in a datacenter; otherwise a 406 means "blocked from this network", not a wrong parameter.

Ids.

  • Games are identified by gamePk (game_pk here), from mlb_get_schedule.
  • Teams by team_id (147 Yankees, 119 Dodgers ...), from mlb_list_teams.
  • Players by person_id, from mlb_search_people or a roster.
  • sport_id picks the level: 1 MLB (default), 11 Triple-A, 12 Double-A, 13 High-A, 14 Single-A, 16 Rookie, 17 winter leagues. Leagues: 103 American League, 104 National League.

Typical flow.

  1. mlb_get_schedule for a day or range (dates YYYY-MM-DD) to get each gamePk, status and probable pitchers.
  2. mlb_get_game for the game summary, mlb_get_boxscore for player lines, mlb_get_linescore for the innings, mlb_get_play_by_play for every plate appearance.
  3. mlb_get_standings, mlb_get_stat_leaders, mlb_get_team_roster.
  4. Player questions: mlb_search_people, then mlb_get_person or mlb_get_player_stats (season, career, gameLog, statSplits, vsTeam).

Reading the data. gameDate is UTC; officialDate is the local game date. Game types: R regular season, F wild card, D division series, L league championship, W World Series, S spring training. Averages and rates (avg, obp, ops, era) are strings such as ".305". The live feed is large: mlb_get_game keeps the summary, use the other game tools for detail.

あなたの AI は MLB Stats API から 2 クリック先。

コネクターをインストール、資格情報を貼り付け、AI に質問。7 日間無料、クレジットカード不要。