Introduction¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin”. When building agents involving sports data analysis, integrating stable data sources is a core requirement. xby-nba-stats is a Model Context Protocol server that provides real-time and historical NBA data, covering player statistics, game scores, team information, and advanced analytics.
Feature Overview¶
This plugin provides data interfaces to agents through the MCP (Model Context Protocol) protocol, mainly including the following functions:
- Basic data queries:
get_todays_scoreboard: Get today’s game scoreboard.get_scoreboard_by_date: Get the game scoreboard for a specified date.get_game_details: Get detailed information for a specific game ID.get_box_score: Get the full box score for a specific game ID.get_schedule: Get a team’s schedule.
- Search and resolution:
resolve_team_id: Resolve a team_id based on team name, city, or abbreviation.resolve_player_id: Resolve a player_id based on player name.find_game_id: Find a game_id based on date and matchup; if no date is provided, find the most recent game.search_players: Search players by name substring.
- Player statistics:
get_player_info: Get basic player information.get_player_season_stats: Get a player’s season statistics.get_player_game_log: Get a player’s season game log.get_player_career_stats: Get a player’s career cumulative statistics.get_player_hustle_stats: Get a player’s hustle statistics.get_player_defense_stats: Get a player’s defensive statistics.get_player_advanced_stats: Get a player’s advanced statistics.get_player_awards: Get a player’s awards.
- League and teams:
get_all_teams: Get information for all teams.get_team_roster: Get a team’s roster.get_standings: Get league standings.get_league_leaders: Get league leaders in points, assists, and other statistics.get_all_time_leaders: Get all-time leaders in historical statistics.get_season_awards: Get season awards.
- Advanced analytics:
get_shot_chart: Get a summary of shot chart data.get_shooting_splits: Get a summary of shooting splits data.get_play_by_play: Get play-by-play data for a game.get_game_rotation: Get game rotation data.get_team_advanced_stats: Get advanced team statistics.
- Utility tools:
set_xby_apikey: Set the API key (automatically persisted).get_server_info: Get the server version and runtime settings.
Installation and Enablement¶
Install this plugin using the official command:
dsh plugin --profile web add github:xby_skill/xby-nba-stats
After installation, the plugin runs with the permissions of the current DSH process. The configuration will take effect automatically after the process is restarted.
Configuration and Prerequisites¶
Before using this plugin, complete the following configuration:
- Get an API key: Visit Xiaobenyang official website, register, and obtain an API key.
- Set the key: Use the
set_xby_apikeycommand in the conversation to set the key.
Typical Usage¶
The following are common use-case scenarios for this plugin in agent development:
- Query today’s scores:
Callget_todays_scoreboarddirectly to get the scoring status of the current NBA schedule. - Resolve player IDs:
Useresolve_player_idto convert user input such as “LeBron James” into the ID required by the API, then query detailed data. - Get a team roster:
Useget_team_rosterto get the current roster of a specific team. - Query season standings:
Useget_standingsto get the real-time standings of the Eastern or Western Conference. - Advanced data analysis:
Callget_player_advanced_statsorget_shot_chartto get a player’s PER (efficiency rating) or shot distribution data.
Notes¶
- This plugin belongs to the online tool category and depends on external data sources.
- The license is MIT; the open-source license allows free use and modification.
- Before installation, it is recommended to review the GitHub source code and license to ensure compliance with project policies.