Provides MCP-based access to NBA live data and statistics through a Python server.
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.
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.
# 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.pyThe 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.
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.
Fetch today's NBA scoreboard (live or latest) and returns game IDs, start times, scores, and broadcast details.
Fetch real-time box score for a given NBA game ID, providing detailed player and team statistics.
Retrieve live play-by-play actions for a specific game, including scoring plays, fouls, timeouts, and substitutions.
Retrieve basic information about a player, including biographical data, height, weight, team, and position.
Obtain a player's career statistics in formats such as per game, totals, or per 36 minutes.
Return a list of all currently active NBA players.
Obtain a player's game statistics within a specified date range.
Fetch a team's game logs using the team name to avoid numeric IDs.
Fetch game results for a given team ID and date range.
Fetch NBA team standings for a given season and season type.
Fetch team statistics using the team name with various aggregation methods.
Fetch statistics for all NBA teams across multiple seasons.
Return scoreboard data for a specific date.