# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T09:48:06+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 (
CanceledMembership,
CompetitionDetail,
FieldFormatActiveMembershipsGetResponse,
FieldFormatAreasGetResponse,
FieldFormatCompetitionHierarchyGetResponse,
FieldFormatCompetitionsGetResponse,
FieldFormatGamesByDateDateGetResponse,
FieldFormatHistoricalMembershipsByCompetitionCompetitionGetResponse,
FieldFormatHistoricalMembershipsByTeamTeamidGetResponse,
FieldFormatHistoricalMembershipsGetResponse,
FieldFormatMembershipsByCompetitionCompetitionGetResponse,
FieldFormatMembershipsByTeamTeamidGetResponse,
FieldFormatPlayersByTeamTeamidGetResponse,
FieldFormatPlayersGetResponse,
FieldFormatRecentlyChangedMembershipsDaysGetResponse,
FieldFormatScheduleRoundidGetResponse,
FieldFormatSeasonTeamsSeasonidGetResponse,
FieldFormatStandingsRoundidGetResponse,
FieldFormatTeamGameStatsByDateDateGetResponse,
FieldFormatTeamSeasonStatsRoundidGetResponse,
FieldFormatTeamsGetResponse,
FieldFormatUpcomingScheduleByPlayerPlayeridGetResponse,
FieldFormatVenuesGetResponse,
Format,
Player,
)
app = MCPProxy(
contact={'x-twitter': 'nfldata'},
title='Soccer v3 Scores',
version='1.0',
servers=[
{'url': 'http://azure-api.sportsdata.io/v3/soccer/scores'},
{'url': 'https://azure-api.sportsdata.io/v3/soccer/scores'},
],
)
@app.get(
'/{format}/ActiveMemberships',
tags=['membership_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_active(format: Format = 'xml'):
"""
Memberships (Active)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Areas',
tags=['competition_information', 'match_data', 'venue_details'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def areas_countries(format: Format = 'xml'):
"""
Areas (Countries)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/CanceledMemberships',
tags=['membership_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def canceled_memberships(format: Format):
"""
Canceled Memberships
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/CompetitionDetails/{competition}',
tags=['competition_information', 'match_data', 'game_scheduling'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def competition_fixtures_league_details(format: Format = 'xml', competition: str = ...):
"""
Competition Fixtures (League Details)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/CompetitionHierarchy',
tags=['competition_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def competition_hierarchy_league_hierarchy(format: Format = 'xml'):
"""
Competition Hierarchy (League Hierarchy)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Competitions',
tags=['competition_information', 'match_data'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def competitions_leagues(format: Format = 'xml'):
"""
Competitions (Leagues)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/GamesByDate/{date}',
tags=['match_data', 'game_scheduling'],
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}/HistoricalMemberships',
tags=['membership_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_historical(format: Format = 'xml'):
"""
Memberships (Historical)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/HistoricalMembershipsByCompetition/{competition}',
tags=['membership_management', 'competition_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_by_competition_historical(
format: Format = 'xml', competition: str = ...
):
"""
Memberships by Competition (Historical)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/HistoricalMembershipsByTeam/{teamid}',
tags=['membership_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_by_team_historical(format: Format = 'xml', teamid: str = ...):
"""
Memberships by Team (Historical)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/MembershipsByCompetition/{competition}',
tags=['membership_management', 'competition_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_by_competition_active(format: Format = 'xml', competition: str = ...):
"""
Memberships by Competition (Active)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/MembershipsByTeam/{teamid}',
tags=['membership_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_by_team_active(format: Format = 'xml', teamid: str = ...):
"""
Memberships by Team (Active)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Player/{playerid}',
tags=['player_profiles'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def player(format: Format = 'xml', playerid: str = ...):
"""
Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Players',
tags=['player_profiles', 'competition_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def players(format: Format = 'xml'):
"""
Players
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/PlayersByTeam/{teamid}',
tags=['player_profiles'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def players_by_team(format: Format = 'xml', teamid: str = ...):
"""
Players by Team
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/RecentlyChangedMemberships/{days}',
tags=['membership_management'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def memberships_recently_changed(format: Format = 'xml', days: str = ...):
"""
Memberships (Recently Changed)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Schedule/{roundid}',
tags=['game_scheduling', 'competition_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def schedule(format: Format = 'xml', roundid: str = ...):
"""
Schedule
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/SeasonTeams/{seasonid}',
tags=['competition_information', 'team_performance_statistics'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def season_teams(format: Format = 'xml', seasonid: str = ...):
"""
Season Teams
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Standings/{roundid}',
tags=['competition_information', 'match_data'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def standings(format: Format = 'xml', roundid: str = ...):
"""
Standings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/TeamGameStatsByDate/{date}',
tags=['match_data', 'team_performance_statistics'],
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}/TeamSeasonStats/{roundid}',
tags=['team_performance_statistics', 'competition_information'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def team_season_stats(format: Format = 'xml', roundid: str = ...):
"""
Team Season Stats
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Teams',
tags=['team_performance_statistics'],
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")
@app.get(
'/{format}/UpcomingScheduleByPlayer/{playerid}',
tags=['game_scheduling', 'match_data', 'player_profiles'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def upcoming_schedule_by_player(format: Format = 'xml', playerid: str = ...):
"""
Upcoming Schedule By Player
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/{format}/Venues',
tags=['venue_details'],
security=[
APIKeyHeader(name="Ocp-Apim-Subscription-Key"),
APIKeyQuery(name="key"),
],
)
def venues(format: Format = 'xml'):
"""
Venues
"""
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)