# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T09:41:22+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 (
FieldFormatAllTeamsGetResponse,
FieldFormatDepthChartsGetResponse,
FieldFormatFreeAgentsGetResponse,
FieldFormatGamesByDateDateGetResponse,
FieldFormatGamesSeasonGetResponse,
FieldFormatNewsByDateDateGetResponse,
FieldFormatNewsByPlayerIDPlayeridGetResponse,
FieldFormatNewsGetResponse,
FieldFormatPlayersGetResponse,
FieldFormatPlayersTeamGetResponse,
FieldFormatRefereesGetResponse,
FieldFormatStadiumsGetResponse,
FieldFormatStandingsSeasonGetResponse,
FieldFormatTeamGameStatsByDateDateGetResponse,
FieldFormatTeamGameStatsBySeasonSeasonTeamidNumberofgamesGetResponse,
FieldFormatTeamSeasonStatsSeasonGetResponse,
FieldFormatTeamsGetResponse,
Format,
Format14,
Format15,
Player,
Season,
)
app = MCPProxy(
contact={'x-twitter': 'nfldata'},
title='NBA v3 Scores',
version='1.0',
servers=[
{'url': 'http://azure-api.sportsdata.io/v3/nba/scores'},
{'url': 'https://azure-api.sportsdata.io/v3/nba/scores'},
],
)
@app.get(
'/{format}/AllTeams',
tags=['team_info_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def teams_all(format: Format = 'XML'):
"""
Teams (All)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/AreAnyGamesInProgress',
description=""" Returns true if there is at least one game being played at the time of the request or false if there are none. """,
tags=['game_status_check'],
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}/CurrentSeason',
tags=['season_standings_info'],
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}/DepthCharts',
description=""" Returns the full list of NBA Referees. """,
tags=['team_depth_chart_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def depth_charts(format: Format = 'XML'):
"""
Depth Charts
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/FreeAgents',
tags=['player_information_access'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player_details_by_free_agent(format: Format = 'XML'):
"""
Player Details by Free Agent
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Games/{season}',
tags=['game_status_check', 'season_standings_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=['game_status_check', 'season_standings_info'],
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}/News',
tags=['sports_news_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def news(format: Format = 'XML'):
"""
News
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/NewsByDate/{date}',
tags=['sports_news_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def news_by_date(format: Format = 'XML', date: str = ...):
"""
News by Date
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/NewsByPlayerID/{playerid}',
tags=['player_information_access', 'sports_news_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def news_by_player(format: Format = 'XML', playerid: str = ...):
"""
News by Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Player/{playerid}',
tags=['player_information_access'],
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}/Players',
tags=['player_information_access', 'team_info_retrieval'],
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}',
description=""" This endpoint provides active player details by team. """,
tags=['team_info_retrieval', 'player_information_access'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def players_by_team(format: Format = 'XML', team: str = ...):
"""
Players by Team
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Referees',
description=""" Returns the full list of NBA Referees. """,
tags=['referee_stadium_details'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def referees(format: Format = 'XML'):
"""
Referees
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Stadiums',
tags=['referee_stadium_details'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def stadiums(format: Format14 = 'xml'):
"""
Stadiums
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Standings/{season}',
tags=['season_standings_info'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def standings(format: Format15 = 'XML', season: str = ...):
"""
Standings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/TeamGameStatsByDate/{date}',
tags=['team_info_retrieval', 'game_status_check'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_game_stats_by_date(format: Format15 = '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_standings_info', 'team_info_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_game_logs_by_season(
format: Format15 = 'XML',
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=['team_info_retrieval', 'season_standings_info'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_season_stats(format: Format15 = 'XML', season: str = ...):
"""
Team Season Stats
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/teams',
tags=['team_info_retrieval'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def teams_active(format: Format15 = 'XML'):
"""
Teams (Active)
"""
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)