Provides access to Fantasy NBA Israel League statistics and rankings, including team details, player statistics, league-wide shooting data, and comprehensive analytics across basketball categories (FG%, FT%, 3PM, AST, REB, STL, BLK, PTS).
Fantasy NBA Israel League MCP
A Model Context Protocol (MCP) server that provides tools for accessing our Fantasy NBA Israel League statistics and rankings.
Description
This MCP server connects to a specific Fantasy NBA League API (Fantasy NBA Israel League) and provides tools to retrieve team rankings, player statistics, and detailed analytics.
Note: This server is configured for a specific private league and connects to its dedicated API endpoint. It is not a general-purpose tool for any Fantasy NBA league - it's designed specifically for our league's data structure and API.
Features
Get Average League Rankings: Retrieve team rankings with detailed statistics
Sort in ascending or descending order
Detailed stats per category (FG%, FT%, 3PM, AST, REB, STL, BLK, PTS, GP)
Total points and rank for each team
Get Teams: Retrieve list of all teams in the league
Get Average Stats: Get team statistics in a user-friendly format with stats mapped by category
Option to retrieve raw or normalized (0-1 scale) data
Includes games played (GP) for each team
Get Team Details: Retrieve comprehensive details for a specific team
Team statistics (totals and averages)
Complete roster with player stats including minutes played
ESPN team page URL
Shot chart stats and ranking information
Category ranks across all statistical categories
Get All Players: Retrieve all players in the league with comprehensive statistics
Includes minutes played and games played for each player
Get League Shots Stats: Retrieve league-wide shooting statistics for all teams
Prerequisites
Before using this MCP server, you'll need:
uv: A fast Python package installer and runnerInstall from https://docs.astral.sh/uv/
On macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shOn Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
An MCP-compatible client: Choose one of the following or similar:
Claude Desktop - AI assistant with MCP support
Cursor - AI-powered code editor
Cline - VSCode extension for AI assistance
Any other MCP-compatible application
Usage
As an MCP Server
This server works with any MCP-compatible client (Claude Desktop, Cursor, Cline, VSCode with GitHub Copilot Chat, etc.). Add the following configuration to your client's MCP settings file:
Common configuration file locations:
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows)Cursor:
.cursor/mcp.jsonin your project or global settingsCline: Use the MCP settings UI or edit
cline_mcp_settings.jsonVSCode:
.vscode/mcp.jsonin your workspace
Local Development
For local development and testing, you can run the MCP server in development mode:
This will start an interactive MCP inspector where you can test your tools.
Standalone Testing
Or run directly:
Available Tools
getAveragesLeagueRankings
Get the average league rankings from the API.
Parameters:
order(str, optional): Sort order for rankings"desc"= best to worst (top teams first) - Default"asc"= worst to best (bottom teams first)
Returns: A list of teams with their rankings, total points, and stats per category.
Example Response:
getTeams
Get the list of all teams in the league.
Parameters: None
Returns: A list of teams with their IDs and names.
Example Response:
getAverageStats
Get average stats for all teams in a user-friendly format with stats mapped by category name.
Parameters:
use_normalized(bool, optional): Iftrue, returns normalized data (0-1 scale). Iffalse, returns raw stat values. Default isfalse.
Returns: A list of teams with their stats mapped by category name.
Example Response:
getTeamDetails
Get comprehensive details for a specific team including statistics, roster, and rankings.
Parameters:
team_id(int): The ID of the team to get details for
Returns: Comprehensive team information including team stats, ESPN URL, shot chart, rankings, and full roster.
Example Response:
getAllPlayers
Get all players in the league with comprehensive statistics.
Parameters: None
Returns: A list of all players with their stats and team association.
Example Response:
getLeagueShotsStats
Get league-wide shooting statistics for all teams.
Parameters: None
Returns: League-wide shooting statistics with field goal and free throw data for each team.
Example Response:
Requirements
Python >= 3.10
httpx >= 0.28.1
mcp[cli] >= 1.18.0
Development
To run the server locally for development and testing:
The MCP inspector will provide an interactive interface to test all your tools.
Author
Asaf Shai (asafshai211@gmail.com)
Support
For issues and questions, please open an issue on the GitHub repository.