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.

Functions
15
Sign-in
For account actions
Works with
MCP, HTTP, Node, Python

Connect

Just MLB

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/mlb
Every site

One MCP server for MLB and every other site Bowmark covers. Your agent looks up what it needs and calls it.

https://api.bowmark.ai/mcp
Set it up in your client

Both 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.

Read 15
  • getArticleGets one MLB.com article: headline, author, date, body text, images and tagged players and teams.

    Arguments

    NameTypeRequired
    urlstring
    An mlb.com /news/<slug> link, from listNews or searchContent.
    Yes

    Returns MlbArticle

    interface 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/getArticle

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    gamePknumber
    From getSchedule().
    Yes

    Returns MlbBoxScore

    interface 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/getBoxScore

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    gamePknumber
    From getSchedule().
    Yes

    Returns MlbGameSummary

    interface 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/getGame

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    gamePknumberYes
    inningnumber
    Only this inning.
    No
    scoringOnlyboolean
    Only 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/getPlayByPlay

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    playerIdnumber
    From searchPlayers().
    Yes
    seasonnumber
    Season for the season stat line; default the current one.
    No

    Returns MlbPlayerProfile

    interface 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/getPlayer

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    playerIdnumber
    From 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 MlbStatGroup

    interface 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/getPlayerStats

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    teamIdnumber
    From 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/getRoster

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    datestring
    One 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/getSchedule

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    seasonnumber
    Season year; default the current one.
    No
    leagueId103 | 104
    103 = 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/getStandings

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.mlb.getStandings({ season: 2025 });
  • getStatLeadersLists the league leaders in a stat category for a season, MLB-wide or per league.

    Arguments

    NameTypeRequired
    categorystring
    MLB's own category name: "homeRuns", "battingAverage", "earnedRunAverage", "strikeouts", "wins", …
    Yes
    seasonnumberNo
    leagueIdnumber
    103 = American League, 104 = National League; omit for MLB-wide.
    No
    statGroup"hitting" | "pitching" | "fielding"No
    limitnumber
    1-100, default 10.
    No

    Returns MlbLeaderBoard

    interface 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/getStatLeaders

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    teamstring
    Mlb.com team slug, e.g. "yankees" or "red-sox"; omit for league-wide.
    No
    limitnumber
    1-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/listNews

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    seasonnumber
    Season year; default the current one.
    No
    sportIdnumber
    1 = 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/listTeams

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.mlb.listTeams();
  • searchContentSearches MLB.com's news articles and videos by keyword, as the site search does.

    Arguments

    NameTypeRequired
    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/searchContent

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.mlb.searchContent("Aaron Judge");
  • searchPlayersFinds players by name, current or retired, and returns their ids, positions and teams.

    Arguments

    NameTypeRequired
    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/searchPlayers

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    argsMlbSearchVideosArgs | stringYes
    interface MlbSearchVideosArgs {
      query: string;
      /** 1-50, default 10. */
      limit?: number;
      /** Zero-based page of results. */
      page?: number;
    }

    Returns MlbVideoSearch

    interface 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/searchVideos

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.mlb.searchVideos("aaron judge home run");

Use it from code