MLB MCP server for AI agents
Let Claude, ChatGPT or your own agent read MLB: 15 typed functions through one MCP server. No MLB API key needed.
- Site
- mlb.com
- Functions
- 15
- Sign-in
- For account actions
- Works with
- MCP, HTTP, Node, Python
Connect
An MCP server for MLB alone, with one tool per function. Paste it into Claude, ChatGPT, Cursor or any MCP client as a remote server.
https://api.bowmark.ai/mcp/site/mlbOne MCP server for MLB and every other site Bowmark covers. Your agent looks up what it needs and calls it.
https://api.bowmark.ai/mcpSet it up in your clientBoth need a Bowmark API key. The quickstart gets you one and a first result in a few minutes. Functions that need a login use the person's own account: how sign-in works.
Functions
Open a function to see its arguments, what it returns and how to call it.
getArticleGets one MLB.com article: headline, author, date, body text, images and tagged players and teams.Arguments
Name Type Required urlstringAn mlb.com /news/<slug> link, from listNews or searchContent.Yes Returns
MlbArticleinterface MlbArticle { url: string; headline: string; author: string | null; publishedAt: string | null; modifiedAt: string | null; description: string | null; imageUrl: string | null; paragraphs: string[]; playerIds: number[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getArticleCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getArticle({ url: "<url>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getArticle({"url": "<url>"}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getArticle \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"url":"<url>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getArticle({ url: "<url>" });getBoxScoreGets a game's box score: every batter's and pitcher's line for both teams, plus team totals.Arguments
Name Type Required gamePknumberFrom getSchedule().Yes Returns
MlbBoxScoreinterface MlbBatterLine { id: number; name: string; position: string | null; battingOrder: number | null; atBats: number; runs: number; hits: number; rbi: number; walks: number; strikeouts: number; homeRuns: number; seasonAvg: string | null; } interface MlbPitcherLine { id: number; name: string; inningsPitched: string; hits: number; runs: number; earnedRuns: number; walks: number; strikeouts: number; homeRuns: number; pitches: number | null; seasonEra: string | null; } interface MlbBoxScoreSide { teamId: number; team: string; totals: { runs: number; hits: number; walks: number; strikeouts: number; homeRuns: number; leftOnBase: number }; batters: MlbBatterLine[]; pitchers: MlbPitcherLine[]; } interface MlbBoxScore { gamePk: number; away: MlbBoxScoreSide; home: MlbBoxScoreSide; notes: { label: string; value: string }[]; officials: { role: string; name: string }[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getBoxScoreCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getBoxScore({ gamePk: 778477 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getBoxScore({"gamePk": 778477}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getBoxScore \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"gamePk":778477}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getBoxScore({ gamePk: 778477 });getGameGets one game's summary: teams, status, inning, line score, winning and losing pitchers, venue, weather and attendance.Arguments
Name Type Required gamePknumberFrom getSchedule().Yes Returns
MlbGameSummaryinterface MlbGameTeamLine { teamId: number | null; team: string | null; runs: number | null; hits: number | null; errors: number | null; leftOnBase: number | null; } interface MlbGameSummary { gamePk: number; date: string | null; status: string | null; // the site's own labels, read the values off a result, never guess one from prose state: string | null; inning: string | null; venue: string | null; weather: string | null; attendance: number | null; durationMinutes: number | null; away: MlbGameTeamLine; home: MlbGameTeamLine; innings: { inning: number; away: number | null; home: number | null }[]; winningPitcher: { id: number; name: string } | null; losingPitcher: { id: number; name: string } | null; savePitcher: { id: number; name: string } | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getGameCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getGame({ gamePk: 778477 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getGame({"gamePk": 778477}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getGame \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"gamePk":778477}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getGame({ gamePk: 778477 });getPlayByPlayLists every plate appearance in a game, inning by inning, with the pitches, the result and the score after each play.Arguments
Name Type Required gamePknumberYes inningnumberOnly this inning.No scoringOnlybooleanOnly scoring plays.No Returns
MlbPlay[]interface MlbPlay { index: number; inning: number; half: string; batter: string | null; pitcher: string | null; event: string | null; description: string | null; rbi: number; outs: number | null; pitches: number; isScoring: boolean; awayScore: number | null; homeScore: number | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getPlayByPlayCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getPlayByPlay({ gamePk: 778477 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getPlayByPlay({"gamePk": 778477}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getPlayByPlay \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"gamePk":778477}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getPlayByPlay({ gamePk: 778477 });getPlayerGets one player's profile: bio, position, bats and throws, team, draft and debut, with season and career stats.Arguments
Name Type Required playerIdnumberFrom searchPlayers().Yes seasonnumberSeason for the season stat line; default the current one.No Returns
MlbPlayerProfileinterface MlbStatLine { season: string | null; team: string | null; teamId: number | null; level: string | null; // the site's own labels, read the values off a result, never guess one from prose split: string | null; /** MLB's own stat names and string-formatted values, e.g. { homeRuns: 55, avg: ".282" }. */ stat: Record<string, string | number | null>; } interface MlbStatGroup { warning?: string; group: string; type: string; lines: MlbStatLine[]; } interface MlbPlayerProfile { id: number; name: string; nickname: string | null; position: string | null; number: string | null; bats: string | null; throws: string | null; height: string | null; weight: number | null; age: number | null; birthDate: string | null; birthPlace: string | null; active: boolean; team: string | null; teamId: number | null; mlbDebut: string | null; draftYear: number | null; slug: string | null; url: string; stats: MlbStatGroup[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getPlayerCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getPlayer({ playerId: 660271 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getPlayer({"playerId": 660271}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getPlayer \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"playerId":660271}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getPlayer({ playerId: 660271 });getPlayerStatsGets a player's stats for a season or career, by hitting, pitching or fielding, including splits such as home/away and vs left/right.Arguments
Name Type Required playerIdnumberFrom searchPlayers().Yes group"hitting" | "pitching" | "fielding"No type"season" | "career" | "yearByYear" | "statSplits" | "homeAndAway" | "byMonth" | "winLoss" | "lastXGames" | "gameLog"Default "season". "statSplits" with sitCodes (e.g. "vl,vr") gives vs-left/right.No seasonnumberNo sitCodesstringNo Returns
MlbStatGroupinterface MlbStatLine { season: string | null; team: string | null; teamId: number | null; level: string | null; // the site's own labels, read the values off a result, never guess one from prose split: string | null; /** MLB's own stat names and string-formatted values, e.g. { homeRuns: 55, avg: ".282" }. */ stat: Record<string, string | number | null>; } interface MlbStatGroup { warning?: string; group: string; type: string; lines: MlbStatLine[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getPlayerStatsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getPlayerStats({ playerId: 660271, season: 2025 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getPlayerStats({"playerId": 660271, "season": 2025}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getPlayerStats \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"playerId":660271,"season":2025}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getPlayerStats({ playerId: 660271, season: 2025 });getRosterGets a team's roster (active, 40-man, full season or depth chart) with each player's position, number and status.Arguments
Name Type Required teamIdnumberFrom listTeams().Yes rosterType"active" | "40Man" | "fullSeason" | "fullRoster" | "depthChart" | "nonRosterInvitees" | "allTime" | "coach"Default "active".No seasonnumberNo Returns
MlbRosterEntry[]interface MlbRosterEntry { playerId: number; name: string; number: string | null; position: string | null; positionType: string | null; status: string | null; // the site's own labels, read the values off a result, never guess one from prose }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getRosterCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getRoster({ teamId: 147 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getRoster({"teamId": 147}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getRoster \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"teamId":147}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getRoster({ teamId: 147 });getScheduleLists MLB games for a date or date range, optionally one team's: matchup, start time, venue, status, score and probable pitchers.Arguments
Name Type Required datestringOne day, YYYY-MM-DD; default today.No startDatestringNo endDatestringNo teamIdnumberNo sportIdnumberNo Returns
MlbScheduledGame[]interface MlbGameSide { teamId: number | null; team: string | null; score: number | null; isWinner: boolean | null; record: string | null; probablePitcher: { id: number; name: string } | null; } interface MlbScheduledGame { gamePk: number; date: string; startTime: string; type: string | null; status: string | null; // the site's own labels, read the values off a result, never guess one from prose state: string | null; inning: string | null; venue: string | null; series: string | null; away: MlbGameSide; home: MlbGameSide; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getScheduleCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getSchedule({ teamId: 147, startDate: { $daysFromNow: -330 }, endDate: { $daysFromNow: 0 } });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getSchedule({ "teamId": 147, "startDate": {"$daysFromNow": -330}, "endDate": {"$daysFromNow": 0} }))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getSchedule \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"teamId":147,"startDate":{"$daysFromNow":-330},"endDate":{"$daysFromNow":0}}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getSchedule({ teamId: 147, startDate: { $daysFromNow: -330 }, endDate: { $daysFromNow: 0 } });getStandingsGets the standings by division, league or wild card for a season: wins, losses, percentage, games back, streak and run differential.Arguments
Name Type Required seasonnumberSeason year; default the current one.No leagueId103 | 104103 = American League, 104 = National League; default both.No Returns
MlbStandingsDivision[]interface MlbStandingsTeam { teamId: number; team: string; divisionRank: number | null; wins: number; losses: number; pct: string | null; gamesPlayed: number | null; gamesBack: string | null; wildCardRank: number | null; wildCardGamesBack: string | null; runsScored: number | null; runsAllowed: number | null; runDifferential: number | null; streak: string | null; lastTen: string | null; home: string | null; away: string | null; clinch: string | null; } interface MlbStandingsDivision { divisionId: number | null; division: string | null; leagueId: number | null; teams: MlbStandingsTeam[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getStandingsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getStandings({ season: 2025 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getStandings({"season": 2025}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getStandings \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"season":2025}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getStandings({ season: 2025 });getStatLeadersLists the league leaders in a stat category for a season, MLB-wide or per league.Arguments
Name Type Required categorystringMLB's own category name: "homeRuns", "battingAverage", "earnedRunAverage", "strikeouts", "wins", …Yes seasonnumberNo leagueIdnumber103 = American League, 104 = National League; omit for MLB-wide.No statGroup"hitting" | "pitching" | "fielding"No limitnumber1-100, default 10.No Returns
MlbLeaderBoardinterface MlbLeader { rank: number; value: string; playerId: number | null; player: string | null; teamId: number | null; team: string | null; } interface MlbLeaderBoard { category: string; season: string; leaders: MlbLeader[]; warning?: string; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/getStatLeadersCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.getStatLeaders({ category: "homeRuns", season: 2025 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.getStatLeaders({"category": "homeRuns", "season": 2025}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/getStatLeaders \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"category":"homeRuns","season":2025}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.getStatLeaders({ category: "homeRuns", season: 2025 });listNewsLists the latest MLB.com news stories, league-wide or for one team: headline, link, date and summary.Arguments
Name Type Required teamstringMlb.com team slug, e.g. "yankees" or "red-sox"; omit for league-wide.No limitnumber1-100, default 25.No Returns
MlbNewsItem[]interface MlbNewsItem { title: string; url: string; author: string | null; publishedAt: string | null; imageUrl: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/listNewsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.listNews({ limit: 5 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.listNews({"limit": 5}))curl -X POST https://api.bowmark.ai/v1/sites/mlb/listNews \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"limit":5}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.listNews({ limit: 5 });listTeamsLists the 30 MLB teams (or a minor league's teams) with ids, names, abbreviations, league, division and home ballpark.Arguments
Name Type Required seasonnumberSeason year; default the current one.No sportIdnumber1 = MLB (default); other ids reach the minor leagues.No Returns
MlbTeam[]interface MlbTeam { id: number; name: string; abbreviation: string | null; teamName: string | null; city: string | null; league: string | null; division: string | null; venueId: number | null; venue: string | null; firstYear: number | null; active: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/listTeamsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.listTeams();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.listTeams())curl -X POST https://api.bowmark.ai/v1/sites/mlb/listTeams \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.listTeams();searchContentSearches MLB.com's news articles and videos by keyword, as the site search does.Arguments
Name Type Required argsMlbSearchContentArgs | stringYes interface MlbSearchContentArgs { query: string; /** 1-50, default 10. */ limit?: number; /** "es" for Spanish-language content; default English. */ language?: "en" | "es"; }Returns
MlbContentHit[]interface MlbContentHit { title: string; url: string; contentType: string | null; blurb: string | null; publishedAt: string | null; players: string[]; teams: string[]; imageUrl: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/searchContentCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.searchContent("Aaron Judge");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.searchContent("Aaron Judge"))curl -X POST https://api.bowmark.ai/v1/sites/mlb/searchContent \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":"Aaron Judge"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.searchContent("Aaron Judge");searchPlayersFinds players by name, current or retired, and returns their ids, positions and teams.Arguments
Name Type Required argsMlbSearchPlayersArgs | stringYes interface MlbSearchPlayersArgs { query: string; activeOnly?: boolean; }Returns
MlbPlayerHit[]interface MlbPlayerHit { id: number; name: string; position: string | null; number: string | null; birthDate: string | null; birthCountry: string | null; active: boolean; bats: string | null; throws: string | null; team: string | null; mlbDebut: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/searchPlayersCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.searchPlayers("Aaron Judge");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.searchPlayers("Aaron Judge"))curl -X POST https://api.bowmark.ai/v1/sites/mlb/searchPlayers \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":"Aaron Judge"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.searchPlayers("Aaron Judge");searchVideosSearches MLB's video library (Film Room): highlights and every pitch, by player, team, date, play type or keyword.Arguments
Name Type Required argsMlbSearchVideosArgs | stringYes interface MlbSearchVideosArgs { query: string; /** 1-50, default 10. */ limit?: number; /** Zero-based page of results. */ page?: number; }Returns
MlbVideoSearchinterface MlbVideo { id: string; slug: string; title: string; description: string | null; date: string | null; durationSeconds: number | null; feeds: string[]; url: string; } interface MlbVideoSearch { total: number; videos: MlbVideo[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/mlb/searchVideosCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.mlb.searchVideos("aaron judge home run");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.mlb.searchVideos("aaron judge home run"))curl -X POST https://api.bowmark.ai/v1/sites/mlb/searchVideos \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":"aaron judge home run"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.mlb.searchVideos("aaron judge home run");
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/mlb/<function> - OpenAPI
/v1/sites/mlb/openapi.json