home / mcp / nba mcp server

NBA MCP Server

Provides MCP-based access to NBA live data and statistics through a Python server.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "obinopaul-nba-mcp-server": {
      "command": "python",
      "args": [
        "nba_server.py"
      ]
    }
  }
}

You run a Python-based MCP server that exposes NBA data and live game information to MCP clients. It bridges applications with NBA data services, making it easy to query live scores, box scores, play-by-play actions, player and team statistics, standings, and schedules through a standardized MCP interface.

How to use

You interact with the NBA MCP Server through an MCP client. Start the server locally, then connect to it from your MCP client to access a wide range of NBA data tools. You can request live game data, player statistics, team statistics, league standings, and game results. Use the available MCP endpoints to fetch current live information for games happening today or historical statistics across seasons.

How to install

# Prerequisites
- Python 3.11+ (or compatible 3.x)
- pip

# Run the server locally using MCP runtime
python nba_server.py
# or using MCP CLI
mcp run nba_server.py

Configuration and usage notes

The server is designed to run with a brief 30-second timeout for stable operation and includes signal handling for graceful shutdowns. It relies on the NBA API ecosystem and the MCP framework for a clean API surface and input validation via Pydantic.

Additional notes

Key tools exposed by this server include live game data (scoreboard, box scores, and play-by-play), player information and career statistics, team game logs and standings, and general schedule data. These endpoints enable you to build dashboards, perform analytics, and integrate NBA data into your applications with MCP compatibility.

Available tools

nba_live_scoreboard

Fetch today's NBA scoreboard (live or latest) and returns game IDs, start times, scores, and broadcast details.

nba_live_boxscore

Fetch real-time box score for a given NBA game ID, providing detailed player and team statistics.

nba_live_play_by_play

Retrieve live play-by-play actions for a specific game, including scoring plays, fouls, timeouts, and substitutions.

nba_common_player_info

Retrieve basic information about a player, including biographical data, height, weight, team, and position.

nba_player_career_stats

Obtain a player's career statistics in formats such as per game, totals, or per 36 minutes.

nba_list_active_players

Return a list of all currently active NBA players.

nba_player_game_logs

Obtain a player's game statistics within a specified date range.

nba_team_game_logs_by_name

Fetch a team's game logs using the team name to avoid numeric IDs.

nba_fetch_game_results

Fetch game results for a given team ID and date range.

nba_team_standings

Fetch NBA team standings for a given season and season type.

nba_team_stats_by_name

Fetch team statistics using the team name with various aggregation methods.

nba_all_teams_stats

Fetch statistics for all NBA teams across multiple seasons.

nba_list_todays_games

Return scoreboard data for a specific date.