# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T09:34:34+00:00
import argparse
import json
import os
from typing import *
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import APIKeyHeader, APIKeyQuery, BaseSecurity
from models import (
BoxScore,
FieldFormatBoxScoresDateGetResponse,
FieldFormatBoxScoresDeltaDateMinutesGetResponse,
FieldFormatGamesByDateDateGetResponse,
FieldFormatGamesSeasonGetResponse,
FieldFormatInjuredPlayersGetResponse,
FieldFormatLeagueHierarchyGetResponse,
FieldFormatPlayerGameProjectionStatsByDateDateGetResponse,
FieldFormatPlayerGameStatsByDateDateGetResponse,
FieldFormatPlayerGameStatsBySeasonSeasonPlayeridNumberofgamesGetResponse,
FieldFormatPlayerSeasonStatsByTeamSeasonTeamGetResponse,
FieldFormatPlayerSeasonStatsSeasonGetResponse,
FieldFormatPlayersGetResponse,
FieldFormatPlayersTeamGetResponse,
FieldFormatStadiumsGetResponse,
FieldFormatTeamGameStatsByDateDateGetResponse,
FieldFormatTeamGameStatsBySeasonSeasonTeamidNumberofgamesGetResponse,
FieldFormatTeamSeasonStatsSeasonGetResponse,
FieldFormatTeamsGetResponse,
Format,
Player,
PlayerGame,
PlayerGameProjection,
PlayerSeason,
Season,
Tournament,
)
app = MCPProxy(
contact={'x-twitter': 'nfldata'},
title='CBB v3 Stats',
version='1.0',
servers=[
{'url': 'http://azure-api.sportsdata.io/v3/cbb/stats'},
{'url': 'https://azure-api.sportsdata.io/v3/cbb/stats'},
],
)
@app.get(
'/{format}/AreAnyGamesInProgress',
description=""" Returns <code>true</code> if there is at least one game being played at the time of the request or <code>false</code> if there are none. """,
tags=['game_status_checks'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def are_games_in_progress(format: Format = 'XML'):
"""
Are Games In Progress
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/BoxScore/{gameid}',
tags=['box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def box_score(format: Format = 'XML', gameid: str = ...):
"""
Box Score
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/BoxScores/{date}',
tags=['box_score_retrieval', 'season_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def box_scores_by_date(format: Format = 'XML', date: str = ...):
"""
Box Scores by Date
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/BoxScoresDelta/{date}/{minutes}',
tags=['box_score_retrieval', 'season_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def box_scores_by_date_delta(
format: Format = 'XML', date: str = ..., minutes: str = ...
):
"""
Box Scores by Date Delta
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/CurrentSeason',
tags=['season_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def current_season(format: Format = 'XML'):
"""
Current Season
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Games/{season}',
tags=['season_management', 'tournament_and_league_info'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def schedules(format: Format = 'XML', season: str = ...):
"""
Schedules
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/GamesByDate/{date}',
tags=['season_management', 'box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def games_by_date(format: Format = 'XML', date: str = ...):
"""
Games by Date
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/InjuredPlayers',
description=""" This endpoint provides all currently injured college basketball players, along with injury details. """,
tags=['injury_reports'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def injured_players(format: Format = 'XML'):
"""
Injured Players
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/LeagueHierarchy',
tags=['season_management', 'tournament_and_league_info'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def league_hierarchy(format: Format = 'XML'):
"""
League Hierarchy
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Player/{playerid}',
tags=['player_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_details_by_player(format: Format = 'XML', playerid: str = ...):
"""
Player Details by Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerGameProjectionStatsByDate/{date}',
tags=['player_statistics', 'box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def projected_player_game_stats_by_date(format: Format = 'XML', date: str = ...):
"""
Projected Player Game Stats by Date
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerGameProjectionStatsByPlayer/{date}/{playerid}',
tags=['player_statistics', 'box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def projected_player_game_stats_by_player(
format: Format = 'XML', date: str = ..., playerid: str = ...
):
"""
Projected Player Game Stats by Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerGameStatsByDate/{date}',
tags=['player_statistics', 'box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_game_stats_by_date(format: Format = 'XML', date: str = ...):
"""
Player Game Stats by Date
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerGameStatsByPlayer/{date}/{playerid}',
tags=['player_statistics', 'box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_game_stats_by_player(
format: Format = 'XML', date: str = ..., playerid: str = ...
):
"""
Player Game Stats by Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerGameStatsBySeason/{season}/{playerid}/{numberofgames}',
tags=['season_management', 'player_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_game_logs_by_season(
format: Format, season: str = ..., playerid: str = ..., numberofgames: str = ...
):
"""
Player Game Logs By Season
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerSeasonStats/{season}',
tags=['season_management', 'player_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_season_stats(format: Format = 'XML', season: str = ...):
"""
Player Season Stats
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerSeasonStatsByPlayer/{season}/{playerid}',
tags=['season_management', 'player_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_season_stats_by_player(
format: Format = 'XML', season: str = ..., playerid: str = ...
):
"""
Player Season Stats By Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayerSeasonStatsByTeam/{season}/{team}',
tags=['player_statistics', 'team_statistics', 'season_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_season_stats_by_team(
format: Format = 'XML', season: str = ..., team: str = ...
):
"""
Player Season Stats by Team
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Players',
tags=['player_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_details_by_active(format: Format = 'XML'):
"""
Player Details by Active
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Players/{team}',
tags=['player_statistics', 'team_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_details_by_team(format: Format = 'XML', team: str = ...):
"""
Player Details by Team
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Stadiums',
tags=['stadium_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def stadiums(format: Format = 'XML'):
"""
Stadiums
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/TeamGameStatsByDate/{date}',
tags=['team_statistics', 'box_score_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_game_stats_by_date(format: Format = 'XML', date: str = ...):
"""
Team Game Stats by Date
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/TeamGameStatsBySeason/{season}/{teamid}/{numberofgames}',
description=""" Game by game log of total team statistics. """,
tags=['season_management', 'team_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_game_logs_by_season(
format: Format, season: str = ..., teamid: str = ..., numberofgames: str = ...
):
"""
Team Game Logs By Season
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/TeamSeasonStats/{season}',
tags=['season_management', 'team_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_season_stats(format: Format = 'XML', season: str = ...):
"""
Team Season Stats
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Tournament/{season}',
tags=['season_management', 'tournament_and_league_info'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def tournament_hierarchy(format: Format = 'XML', season: str = ...):
"""
Tournament Hierarchy
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/teams',
tags=['team_statistics', 'season_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def teams(format: Format = 'XML'):
"""
Teams
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="MCP Server")
parser.add_argument(
"transport",
choices=["stdio", "sse", "streamable-http"],
help="Transport mode (stdio, sse or streamable-http)",
)
args = parser.parse_args()
if "CONFIG_PATH" in os.environ:
config_path = os.environ["CONFIG_PATH"]
app.load_configuration(config_path)
if "CONFIG" in os.environ:
config = os.environ["CONFIG"]
app.load_configuration_from_string(config)
if "SECURITY" in os.environ:
security_params = BaseSecurity.parse_security_parameters_from_env(
os.environ,
)
app.set_security_params(security_params)
mcp_settings = json.loads(os.environ.get("MCP_SETTINGS", "{}"))
app.get_mcp(**mcp_settings).run(transport=args.transport)