Connector guide6-minute read15 MCP tools7 languages

How to Connect MLB Stats API to Claude via MCP

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.

HCBy HelpCode teamUpdated 6 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

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.

tools

15

Region

INTL

Category

Sports

Authentication

Public API

Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

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.

Start free trial

AnythingMCP is listed in Claude's connector directory: add it to Claude in one click (opens in a new tab), then sign in and choose which MCP servers Claude may use.

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.

MLB Stats API · live via MCP
Share
Opus 4.7

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 + Claude

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.

  1. In the connector store, pick MLB Stats API and install it. There is nothing to paste and no Authorize with Provider step.
  2. 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 Claude

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 shows YOUR_SERVER_ID.

Recommended path: works on claude.ai web without editing any config file.

  1. In Claude, open Customize → Connectors.
  2. Click +, then Add custom connector.
  3. Enter a name, e.g. MLB Stats API, and the remote MCP server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID, then click Add.
  4. Click Connect and sign in to AnythingMCP (OAuth) to allow access.

All tools below appear in your chat: start typing prompts.

Available tools

ToolWhat it does
mlb_get_scheduleGames 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_gameOne game from the live feed: status, teams, venue, weather, probable pitchers, inning by inning runs with totals, the winning, losing and…
mlb_get_boxscoreBox 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_linescoreLine 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_playEvery 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_teamsTeams of a level (MLB by default) with id, name, abbreviation, league, division, ballpark and first year of play
mlb_get_team_rosterRoster of a team with person id, name, jersey number, position and status. rosterType active is the 26-man roster; 40Man, fullSeason and…
mlb_get_standingsStandings by division: wins, losses, winning percentage, games back, wild card games back, division and wild card rank, run differential…
mlb_search_peopleFind players (and coaches or umpires) by name: id, position, number, current team, birth date, bats and throws, MLB debut
mlb_get_personProfile of one player: position, number, team, birth date and place, height, weight, bats and throws, debut and draft year
mlb_get_player_statsStatistics of a player. stats picks the kind: season, career, yearByYear, gameLog, lastXGames, statSplits (with sit_codes such as vl,vr for…
mlb_get_team_statsTeam statistics: season totals, statSplits by situation or byMonth for hitting, pitching or fielding
mlb_get_stat_leadersLeague leaders in one or more categories, such as homeRuns, battingAverage, onBasePlusSlugging, stolenBases, earnedRunAverage, strikeouts…
mlb_list_transactionsRoster moves in a date range: trades, signings, injured list placements and activations, call-ups, options and releases, with player, teams…
mlb_get_seasonKey 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 it work with Claude Code as well as Claude Desktop? Yes, point both at https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID.

Next steps

Was this guide helpful?

Your MLB Stats API agent is one click away.

Install the connector, paste the key, prompt Claude. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect MLB Stats API to ChatGPT via MCP

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.

Connectors

How to Connect MLB Stats API to Cursor via MCP

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.

Connectors

How to Connect MLB Stats API to Gemini via MCP

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.

Connectors

How to Connect MLB Stats API to Meta Muse via MCP

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.

Connectors

MLB Stats API to MCP: Live Games, Box Scores and Player Stats in any AI Agent

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.

Connectors

How to Connect Avito to Claude via MCP

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.