
NBA MCP Server
An open-source Model Context Protocol (MCP) server that provides AI agents with real-time and historical NBA statistics, live game scores, player data, and team information using the nba_api library.
What is NBA MCP Server?
The NBA MCP Server is an open-source implementation of the Model Context Protocol (MCP) that bridges AI agents with comprehensive NBA basketball data. It allows large language models (such as Anthropic's Claude) to access real-time scores, player statistics, team information, game logs, and more through standardized MCP tools—eliminating the need for custom API wrappers or manual data fetching.
Built in Python using the popular nba_api package, it turns any MCP-compatible client into a knowledgeable NBA analyst capable of answering questions like "Who won last night's Lakers game?" or "Compare LeBron James' stats this season vs. last."
Key Features
- Live Game Data: Access today's scoreboard, live scores, and game details.
- Player Statistics: Detailed career, season, and per-game stats for any NBA player.
- Team Information: Rosters, game logs, standings, and performance metrics.
- Historical Data: Year-by-year stats, box scores, and advanced analytics.
- MCP Tool Exposure: Standardized tools such as
nba_list_todays_games, player lookup, and stats queries that AI agents can discover and call automatically. - Easy Deployment: Run locally, via Docker, or as a standalone service.
- Lightweight & Fast: Minimal dependencies with quick response times for real-time queries.
How It Works
- Install and run the NBA MCP Server (via pip, uvx, or Docker).
- Configure the server URL or command in your MCP client (e.g., Claude Desktop config).
- Chat with your AI agent naturally — it will automatically use the exposed tools to fetch accurate, up-to-date NBA data and incorporate it into responses.
The server handles authentication (where needed), data formatting, and error handling behind the scenes.
Popular Implementations
Several community versions exist:
- obinopaul/nba-mcp-server: Focuses on core stats and live games.
- labeveryday/nba-stats-mcp: Comprehensive live & historical data with easy install.
- Others specialize in player stats (basketball-reference), betting odds, or advanced analytics.
Use Cases
- Sports Journalism & Analysis: AI-powered recaps, comparisons, and insights.
- Fan Engagement Apps: Real-time chatbots that answer NBA questions instantly.
- Betting & Fantasy: Pull odds, projections, and performance data (in compatible variants).
- Research & Education: Historical trend analysis and player career deep-dives.
- Multi-Agent Workflows: Combine with other MCP servers (e.g., news or calendar) for complete sports automation.
- Personal Assistants: Settle debates with factual data during live games.
Getting Started
Most versions support quick installation:
pip install nba-stats-mcp
# or
uvx nba-stats-mcp
Then add to your Claude Desktop (or other MCP client) configuration file. Full setup instructions, including Docker options, are available in the respective GitHub repositories.
No API keys are required for basic nba_api usage (rate limits apply).
Benefits
- Real-Time Accuracy: Always pulls fresh data instead of relying on outdated knowledge cutoffs.
- Agent-Native: Designed specifically for tool-calling LLMs.
- Open & Extensible: Community-driven; easy to fork or extend with new tools.
- Privacy-Friendly: Run locally with full control over data access.
The NBA MCP Server exemplifies how domain-specific MCP servers can make specialized knowledge instantly accessible to AI agents, turning casual conversations into data-rich experiences.
Explore variants on GitHub for the best fit (e.g., obinopaul/nba-mcp-server or labeveryday/nba-stats-mcp).
Tags
Related Entries
Keep exploring similar tools and resources in this category.
Related Reads
Background, tutorials, and protocol context connected to this entry.







