Skip to main content
Glama
MLB Stats MCP

MLB Stats MCP

by prnv-13

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Live and historical Major League Baseball data from the public MLB Stats API. Use search_players to turn a name into a player_id before calling player tools. Team arguments accept a name, nickname, abbreviation or numeric id (e.g. 'Yankees', 'NYY', 'New York Yankees', '147'). Seasons default to the current year; during the off-season pass the previous year if the current one has no data. Dates are YYYY-MM-DD.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_teamsA

List all 30 MLB teams with their ids, abbreviations, league, division and ballpark.

get_team_rosterA

Get a team's roster.

Args:
    team: Team name, abbreviation or id, e.g. "Dodgers", "LAD" or "119".
    roster_type: "active" (26-man), "40Man", or "fullSeason" (everyone who played that season).
    season: Season year; defaults to the current one.
search_playersA

Find MLB players by name and return their player_id (needed by other player tools).

Args:
    name: Full or partial name, e.g. "Ohtani" or "Aaron Judge".
    active_only: Only return currently active players.
get_player_infoA

Get a player's biography: team, position, age, height, handedness, debut, birthplace.

Args:
    player_id: MLB player id from search_players.
get_player_statsA

Get a player's batting, pitching or fielding stats.

Args:
    player_id: MLB player id from search_players.
    group: "hitting", "pitching" or "fielding".
    stat_type: "season" (one season), "career" (career totals) or "yearByYear" (every season).
    season: Season year for stat_type="season"; defaults to the current one.
get_player_game_logA

Get a player's game-by-game stats, most recent game first. Use for recent form, hot or cold streaks, and "how did he do last night / this week" questions.

Args:
    player_id: MLB player id from search_players.
    group: "hitting" or "pitching".
    season: Season year; defaults to the current one.
    last_n: Number of most recent games to return (1-162).
get_league_leadersA

Get the league leaders for a statistic.

Args:
    category: Stat category, e.g. homeRuns, battingAverage, runsBattedIn, stolenBases,
        onBasePlusSlugging, hits, earnedRunAverage, strikeouts, wins, saves, walksAndHitsPerInningPitched.
    season: Season year; defaults to the current one.
    group: "hitting" or "pitching". Needed for categories shared by both (e.g. strikeouts
        for pitchers vs. batters). Defaults to the API's choice.
    league: "AL", "NL" or "MLB" (both leagues).
    limit: How many leaders to return (1-50).
get_scheduleA

Get MLB games (with scores and probable pitchers) for a date or date range.

Args:
    date: Date as YYYY-MM-DD; defaults to today (US Eastern).
    end_date: Optional end of range (YYYY-MM-DD). Keep ranges short (a few weeks at most).
    team: Optional team filter: name, abbreviation or id.
get_gameA

Get a game's live or final line score plus each team's batting and pitching box score.

Args:
    game_pk: Game id from get_schedule.
get_standingsB

Get division standings: wins, losses, win %, games back, streak and run differential.

Args:
    season: Season year; defaults to the current one.
    league: "AL", "NL" or "MLB" (both).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 10 tools

Disambiguation5/5

Each tool maps to a distinct resource and action: team listing vs. roster, player lookup vs. bio vs. stats vs. game log, league leaders, schedule, single game, and standings. The descriptions explicitly explain boundaries (e.g., search_players yields the player_id consumed by the player tools; get_schedule vs. get_game is list vs. single game). No two tools appear to do the same thing.

Naming Consistency5/5

All tools follow a snake_case verb_noun pattern (get_player_stats, get_team_roster, get_league_leaders), with 'list_teams' appropriately using list for the only enumeration endpoint and 'search_players' for the lookup. No camelCase or vague-verb deviations.

Tool Count5/5

Ten tools is right-sized for an MLB stats server: one per core entity/operation (teams, roster, player lookup, bio, stats, game log, leaders, schedule, game, standings) with no redundant entries.

Completeness4/5

The surface covers the core fan/analyst workflow end to end: discover teams and players, then pull bios, season/career stats, game logs, leaders, schedules, box scores, and standings. Gaps are minor: no transactions, injuries, or team-level aggregate stats, and schedule lookups are discouraged for long ranges.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues