Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the MLB Stats API in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
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.
Try asking
Example prompts for MLB Stats API
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → MLB Stats API, install it with no key, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
MLB Stats API + ChatGPT
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.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
(none: public data, no API key)
Step 1 — Set up the connector
Public data, no key: setup takes under a minute. The connector reads the MLB Stats API, the public data feed behind MLB.com and the MLB app. No MLB account, API key or sign-in is needed.
- In the connector store, pick MLB Stats API and install it. There is nothing to paste and no Authorize with Provider step.
- Check it with
mlb_list_teams: it lists the MLB teams with their id, league, division and ballpark.
Personal, non-commercial use only: the data belongs to MLB Advanced Media, and every answer carries MLB's copyright notice. MLB's terms allow 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.
Network: through the connector proxy: 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. So every tool goes through the instance's connector proxy. On AnythingMCP Cloud the proxy is already set up, with an hourly cap per workspace. A self-hosted instance in a datacenter needs CONNECTOR_PROXY_URL; one on a home or office connection works without it. A 406 means blocked from this network, not a wrong parameter.
What it reads: schedules for a day or a date range, with status, score and probable pitchers; live games with every scoring play and the current at-bat; box scores, line scores and play by play; teams, rosters (the active 26-man roster, 40-man, full season and depth chart) and standings with wild card ranks; players with their profile and stats (season, career, year by year, game log, splits, against a team); team stats; league leaders; roster moves such as trades, signings and injured list placements; and the key dates of a season. Besides MLB it covers Triple-A, Double-A, High-A, Single-A, Rookie and the winter leagues.
Ids: games by game_pk 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. The AI resolves names to ids itself.
Read-only: every tool only reads, so there is nothing to confirm and no tool is switched off at install.
Reading the data: game times come in UTC and the AI converts them to your time zone; the official date is the local game date. Averages and rates such as AVG, OBP, OPS and ERA come as strings like .305. The live feed is large, so the AI reads the game summary first and goes to the box score, line score or play by play for detail.
Limits: MLB publishes no SLA or rate limit, so the AI keeps calls few and does not poll a live game every few seconds. On Cloud, the proxy has an hourly cap per workspace.
The connector does not sign in to an MLB account, stream games or video, or provide data for commercial or bulk use.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in ChatGPT
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
ChatGPT adds MCP servers as plugins on its Plugins page, on the web and on paid plans. Developer mode is no longer needed. In a Business workspace only admins and owners can add one; in Enterprise and Edu an admin can grant the Create plugins with MCPs permission.
- Go to chatgpt.com/plugins, click +, then Add custom MCP server.
- Enter a name, e.g. Name:
MLB Stats API. - Under Connection, enter the Server URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDand keep Authentication on OAuth. - Select I understand and want to continue, then Create as a plugin. When ChatGPT asks, sign in to AnythingMCP and allow access.
- Install the new plugin from your personal plugins, then type @ in a chat and pick it.
Available tools
| Tool | What it does |
|---|---|
mlb_get_schedule | Games for a date or a date range: game id (gamePk), start time in UTC, status, teams, score, winner, records, probable pitchers, venue and… |
mlb_get_game | One game from the live feed: status, teams, venue, weather, probable pitchers, inning by inning runs with totals, the winning, losing and… |
mlb_get_boxscore | Box score of a game: team batting and pitching totals, each batter's line in batting order and each pitcher's line with pitch count… |
mlb_get_linescore | Line score of a game: runs, hits and errors by inning and in total, the current inning, count and outs, and while it is live the pitcher… |
mlb_get_play_by_play | Every plate appearance of a game in order: inning, top or bottom, batter, pitcher, result and description, RBI and the score after the play |
mlb_list_teams | Teams of a level (MLB by default) with id, name, abbreviation, league, division, ballpark and first year of play |
mlb_get_team_roster | Roster of a team with person id, name, jersey number, position and status. rosterType active is the 26-man roster; 40Man, fullSeason and… |
mlb_get_standings | Standings by division: wins, losses, winning percentage, games back, wild card games back, division and wild card rank, run differential… |
mlb_search_people | Find players (and coaches or umpires) by name: id, position, number, current team, birth date, bats and throws, MLB debut |
mlb_get_person | Profile of one player: position, number, team, birth date and place, height, weight, bats and throws, debut and draft year |
mlb_get_player_stats | Statistics of a player. stats picks the kind: season, career, yearByYear, gameLog, lastXGames, statSplits (with sit_codes such as vl,vr for… |
mlb_get_team_stats | Team statistics: season totals, statSplits by situation or byMonth for hitting, pitching or fielding |
mlb_get_stat_leaders | League leaders in one or more categories, such as homeRuns, battingAverage, onBasePlusSlugging, stolenBases, earnedRunAverage, strikeouts… |
mlb_list_transactions | Roster moves in a date range: trades, signings, injured list placements and activations, call-ups, options and releases, with player, teams… |
mlb_get_season | Key dates of a season: spring training, regular season start and end, All-Star game, postseason start and end |
Example prompts
- "When do the Dodgers play this week, and who are the probable pitchers?"
- "Give me the box score of the Yankees' last game, with each pitcher's pitch count."
- "Who leads the American League in home runs and OPS this season?"
- "Show me the AL East standings and the wild card race."
- "What roster moves did the Mets make in the last two weeks?"
FAQ
Does the free ChatGPT plan work with custom MCP servers? OpenAI documents custom MCP servers for paid plans only; the Free plan is not on its list.
Next steps
Was this guide helpful?