Get the FREE Ultimate OpenClaw Setup Guide →

nba

MCP server from Taidgh-Robinson/nba-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio taidgh-robinson-nba-mcp-server uvx nba-mcp-server

How to use

This MCP server provides access to recent NBA game data and player statistics via the nba_api library. It enables Claude to fetch final scores for games from yesterday or earlier, retrieve basic P/R/A (points/rebounds/assists) for players who appeared in those games, pull full per-game stat lines (PTS/REB/AST/STL/BLK/TO/PLUS_MINUS/MIN), and obtain the four factors for those games. Once configured in Claude, you can prompt the model to request data such as “What were yesterday’s game results?” or “Show me the box score for players from last night’s games,” and the server will supply structured responses sourced from nba_api to augment the model’s reasoning with recent, verifiable stats.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Git available to clone the repository

Step-by-step:

  1. Clone the MCP server repository: git clone <repository-url> cd <repository-directory>

  2. Create and activate a virtual environment: python3 -m venv .venv

    macOS/Linux

    source .venv/bin/activate

    Windows (PowerShell)

    ..venv\Scripts\Activate.ps1

    Windows (cmd)

    ..venv\Scripts\activate

  3. Install the package in editable mode (from the repo root): pip install -e .

  4. Ensure the server can be invoked via uvx with the intended package name. For example: uvx nba-mcp-server

  5. Add the MCP configuration for Claude (as shown in mcp_config) and restart Claude using the updated config.

Additional notes

Notes and tips:

  • The server relies on nba_api, which fetches data from NBA data sources. Network access is required, and some data may be rate-limited by the upstream API.
  • If you encounter environment or dependency issues, ensure your virtual environment is active and that nba_api is compatible with your Python version.
  • In Claude, refer to the server by the configured name (e.g., nba) to request data from the NBA MCP Server. You can ask for yesterday’s results, player box scores, full game stats, or four-factor stats.
  • If you need to adjust data ranges (e.g., fetch games from a specific date), modify the server’s internal query logic accordingly or expose environment/config options as needed.
  • No additional environment variables are required by default, but you can add placeholders for API keys or debugging flags if you extend the server.

Related MCP Servers

Sponsor this space

Reach thousands of developers