nba-analytics
Advanced NBA odds tracking, betting analysis, and trivia MCP server for Claude Desktop with line movement detection and AI/ML game simulations
claude mcp add --transport stdio nikhilkichili-nba-analytics-mcp python nba_odds_server.py \ --env ODDS_API_KEY="Your Odds API key"
How to use
This MCP server provides real-time NBA betting odds and related data by bridging LLMs to The Odds API. It exposes tools to fetch current game odds, championship odds, and team-specific schedules, along with several analysis and visualization utilities. Clients (for example Claude Desktop or other MCP-compatible interfaces) can query basic NBA data, request simulations of games or seasons, and retrieve betting insights based on odds movements and historical trends. The available tools are organized into categories such as Basic NBA Data, Simulation, Betting Analysis, NBA Trivia, Line Movement Analysis, Odds Tracking, and Visualization, enabling a wide range of use cases from quick facts to in-depth betting research.
To use the server, start it via the configured command (for example python nba_odds_server.py) within a Python virtual environment that has the mcp package installed. Once running, you can call functions like get_nba_games() to retrieve current games with markets and regions, get_nba_championship_odds() for title odds, and get_nba_team_stats(team_name) for upcoming games by team. You can also run simulations (simulate_nba_game, simulate_championship_odds, simulate_season_remainder) to explore hypothetical outcomes, and access betting analysis tools (get_betting_recommendations, analyze_team_ats_performance, analyze_odds_movement) to inform decisions. Visualization tools can generate charts and trend analyses to accompany reports or prompts.
How to install
Prerequisites:
- Python 3.10 or higher
- A Python virtual environment management tool (e.g., venv)
- Access to The Odds API with a valid API key
-
Set up Python 3.10 or higher (example using pyenv): pyenv local 3.10.13
-
Create and activate a virtual environment: python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install required Python packages (including MCP CLI): pip install "mcp[cli]" httpx
-
Ensure the NBA odds server script nba_odds_server.py is in your project directory and accessible.
-
Create a configuration file (optional if using the provided mcp_config structure). Ensure your environment variable for the API key is set (ODDS_API_KEY) when launching the server.
-
Run the server using the command defined in mcp_config (for example): python nba_odds_server.py
-
Test connectivity with your MCP client by invoking available tools such as get_nba_games or get_nba_championship_odds.
Additional notes
Notes and tips:
- Ensure your The Odds API key is set in the environment as ODDS_API_KEY before starting the server.
- The server relies on Python 3.10+; using a virtual environment helps isolate dependencies.
- If you modify configuration, keep the server-name consistent with your MCP client configuration (e.g., nba-odds).
- Some tools support parameters like markets, regions, and team_name; refer to the available tool definitions to construct valid queries.
- For automated data collection, consider scheduling a separate script (odds_collector.py) to run at desired intervals if you integrate it with your system cron or task scheduler.
- When testing prompts, you can ask for current odds, upcoming games, or championship odds to verify responses and tool outputs.
Related MCP Servers
claude_code-gemini
Simplified Gemini for Claude Code.
kaggle
Kaggle-MCP: Connect Claude AI to the Kaggle API through the Model Context Protocol (MCP), enabling competition, dataset, and kernel operations through the AI interface.
claude_autoapprove_mcp
An MCP server to inject auto-approve MCP functionality into Claude Desktop
omcp
Model Context Protocol Server for the Observational Medical Outcomes Partnership (OMOP) Common Data Model
bitcoin
bitcoin-mcp server accessing local Bitcoin full node data (early alpha preview)
cc-session-search
MCP server for searching and analyzing Claude Code conversation history