Skip to main content

MCP server for accessing NBA statistics and data via direct API calls

Project description

🏀 NBA MCP Server

Access NBA statistics via the Model Context Protocol (MCP).

This package runs an MCP server that exposes 30 NBA tools (live scores, box scores, standings, player/team stats, play-by-play, shot charts, etc.). Supports stdio, streamable HTTP, and SSE transports. Designed for agents and UIs that want structured outputs.

No API key required.

Quick Start

With uvx (Recommended - No Install Required)

Add to your MCP client config (e.g., Claude Desktop):

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "nba-stats": {
      "command": "uvx",
      "args": ["nba-stats-mcp"]
    }
  }
}

Restart your client and start asking!

With pip

pip install nba-stats-mcp

Then configure your MCP client:

{
  "mcpServers": {
    "nba-stats": {
      "command": "nba-stats-mcp"
    }
  }
}

What you get back (JSON + images)

All tools return JSON (encoded in the MCP TextContent.text field). Each response includes:

  • tool_name, arguments
  • text (a readable summary)
  • entities (extracted IDs + asset URLs for easy UI rendering)

Example (trimmed):

{
  "tool_name": "resolve_player_id",
  "arguments": {"query": "LeBron", "limit": 5},
  "text": "Player ID matches for 'LeBron': ...",
  "entities": {
    "players": [
      {
        "player_id": "2544",
        "headshot_url": "https://cdn.nba.com/headshots/nba/latest/1040x760/2544.png",
        "thumbnail_url": "https://cdn.nba.com/headshots/nba/latest/260x190/2544.png"
      }
    ],
    "teams": [],
    "games": []
  }
}

Visual assets (public NBA CDN)

Tool responses include public CDN URLs (no API key required):

  • Player headshots (1040x760 + 260x190 thumbnails)
  • Team logos (SVG)

What You Can Ask

  • "Show me today's NBA games"
  • "What are LeBron James' stats this season?"
  • "Get the box score for Lakers vs Warriors"
  • "Who are the top 10 scorers this season?"
  • "Show me all-time assists leaders"
  • "When do the Celtics play next?"
  • "Get Stephen Curry's shot chart"
  • "Show me Giannis' career awards"

Features

30 comprehensive tools providing access to:

  • Live game scores and play-by-play
  • Player stats, career data, and awards
  • Team rosters and advanced metrics
  • League standings and leaders
  • Shot charts and shooting analytics
  • Historical NBA data

📖 Full Documentation & Tool Reference →

Requirements

  • Python 3.10+
  • An MCP-compatible client

License

MIT License - See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nba_stats_mcp-0.2.0.tar.gz (135.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nba_stats_mcp-0.2.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file nba_stats_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: nba_stats_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 135.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nba_stats_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 449c97dda316cb96bca4deb0b4fe47d6e34bca0274b51345b20d8c572f6fc6b6
MD5 618ea06b333eed0231a822ac5f50677f
BLAKE2b-256 3492a39737b738e6af5bd9aa1e268e58127de941677213778c9134989a69200c

See more details on using hashes here.

File details

Details for the file nba_stats_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nba_stats_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nba_stats_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a4c68a23311408b69e4ef900013549d3796e2064cb23a2de363f3ef722b1694
MD5 22580b20d6884718e6c0502ab2c03db5
BLAKE2b-256 2e3ed3466a266c5f8bfc09c15171457919cc8a604a3f3eb2e1d6a5b862ecb3eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page