Skip to main content
Glama
NBA MCP Server

NBA MCP Server

by stevenyuser

NBA MCP Server

A simple MCP (Model Context Protocol) server for getting NBA data through nba_api. This server allows LLMs to retrieve live game data, player stats, team stats, game logs, team standings, and more.

Demo

https://github.com/user-attachments/assets/ce448f94-0226-4303-95e2-19f125a83a02

Related MCP server: Sleeper API MCP

Tools

Player Tools

get_player_career_stats(player_id: str)

Gets comprehensive career statistics for a player.

get_player_awards(player_id: str)

Retrieve all awards and achievements for a player, including MVP awards, All-Star selections, championships, etc.

get_player_game_log(player_id: str, season: str, season_type: str)

Player game-by-game statistics and results.

Team Tools

get_team_details(team_id: str)

Get comprehensive team information includes championships, conference awards, division awards, history, and background.

get_team_year_by_year_stats(team_id: str) Historical year-by-year team performance statistics.

get_team_game_log(team_id: str, season: str, season_type: str)

Team game-by-game statistics and results.

get_league_team_standings(season: str, season_type: str)

Standings for all teams in the league by season.

Live Game Tools

get_today_scoreboard() Retrieves today's NBA games, including live scores, game statuses, and teaminformation.

get_live_game_boxscore(game_id: str) Gets live game data, including scores, player stats, timeouts, and more.

get_live_game_play_by_play(game_id: str) Gets live play-by-play data from a game.

Resources

nba://players

Returns a list of all NBA players (past and present).

nba://active_players

Returns a list of currently active NBA players.

nba://teams

Returns a list of all NBA teams.

Usage

To use this MCP server with Claude for Desktop, add either of the following to your Claude Desktop config file.

Via uv:

{
  "mcpServers": {
    "nba_mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/nba_mcp",
        "run",
        "server.py"
      ]
    }
  }
}

Via Docker:

{
  "mcpServers": {
    "nba_mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "stevenyuser/nba-mcp"
      ]
    }
  }
}

Available Tools

10 tools
get_league_team_standingsB

Get league team standings for a given season and season type.

Args: season: str The season in the format 'YYYY-YY'. season_type: str The type of season. Pattern: "Regular Season", "Pre Season"

Inputs: season (required), season_type (required). Returns: object

get_live_game_boxscoreA

Get the box score for a specific game by its ID. The box score includes live data for the game, such as scores, player stats, timeouts, and more.

Args: game_id: str The ID of the game.

Inputs: game_id (required). Returns: object

get_live_game_play_by_playB

Get the play-by-play data for a specific game by its ID. The play-by-play data includes detailed information about each play in the game.

Args: game_id: str The ID of the game.

Inputs: game_id (required). Returns: result

get_player_awardsB

Get awards for a player by their ID.

Args: player_id: str The id of the player.

Inputs: player_id (required). Returns: object

get_player_career_statsC

Get career stats for a player by their ID.

Args: player_id: str The id of the player.

Inputs: player_id (required). Returns: object

get_player_game_logC

Get game log for a player by their ID, season, and season type.

Args: player_id: str The id of the player. season: str The season in the format 'YYYY-YY'. season_type: str The type of season. Pattern: "Regular Season", "Pre Season", "Playoffs", "All Star"

Inputs: player_id (required), season (required), season_type (required). Returns: object

get_team_detailsB

Get details for a team by their ID. Details include championship awards, conference awards, division awards, background, history, and more.

Args: team_id: str The id of the team.

Inputs: team_id (required). Returns: object

get_team_game_logA

Get game log for a team by their ID, season, and season type.

Args: team_id: str The id of the team. season: str The season in the format 'YYYY-YY'. season_type: str The type of season. Pattern: "Regular Season", "Pre Season", "Playoffs", "All Star"

Inputs: team_id (required), season (required), season_type (required). Returns: object

get_team_year_by_year_statsC

Get year-by-year stats for a team by their ID.

Args: team_id: str The id of the team.

Inputs: team_id (required). Returns: object

get_today_scoreboardA

Get the current NBA scoreboard for today's games. The NBA scoreboard provides live data for games, including scores, game statuses, and team information.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose targeting specific resources (league standings, live games, players, teams, scoreboard) with no overlap. The descriptions clearly differentiate between standings, boxscores, play-by-play, awards, stats, logs, details, and scoreboard data, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with 'get_' prefix, followed by the resource type (e.g., league_team_standings, player_awards, team_details). The naming is uniform throughout, using snake_case consistently without any deviations or mixed conventions.

    Tool Count5/5

    With 10 tools, the count is well-scoped for an NBA data server, covering core areas like standings, live games, players, teams, and scoreboard. Each tool earns its place by providing distinct data retrieval functions without being overly sparse or bloated.

    Completeness4/5

    The toolset provides comprehensive coverage for retrieving NBA data, including CRUD-like operations for players and teams (e.g., stats, logs, details) and live game information. A minor gap exists in the lack of tools for creating or updating data (e.g., posting comments or simulations), but this is reasonable for a read-only data server focused on retrieval.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      This Model Context Protocol server provides access to the Sleeper Fantasy Football API, enabling agents to fetch data about users, leagues, drafts, rosters, matchups, and player information without requiring an API key.
      7
      -
    • A
      license
      B
      quality
      D
      maintenance
      Provides comprehensive NBA statistics via Model Context Protocol, enabling queries for player stats, game scores, team info, and advanced analytics through natural language.
      21
      11
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for NBA live data and stats, providing read-only tools to query live scores, box scores, player info, standings, and more from NBA.com.
      15
      16 npm
      1
      MIT