Skip to main content
Glama
ag2-mcp-servers

NHL Scores MCP Server

main.py9.06 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T09:46:37+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, FieldFormatFreeAgentsGetResponse, FieldFormatGamesByDateDateGetResponse, FieldFormatGamesSeasonGetResponse, FieldFormatNewsByDateDateGetResponse, FieldFormatNewsByPlayerIDPlayeridGetResponse, FieldFormatNewsGetResponse, FieldFormatPlayersGetResponse, FieldFormatPlayersTeamGetResponse, FieldFormatStadiumsGetResponse, FieldFormatStandingsSeasonGetResponse, FieldFormatTeamGameStatsByDateDateGetResponse, FieldFormatTeamGameStatsBySeasonSeasonTeamidNumberofgamesGetResponse, FieldFormatTeamSeasonStatsSeasonGetResponse, FieldFormatTeamsGetResponse, Format, Format12, Format13, Player, Season, ) app = MCPProxy( contact={'x-twitter': 'nfldata'}, title='NHL v3 Scores', version='1.0', servers=[ {'url': 'http://azure-api.sportsdata.io/v3/nhl/scores'}, {'url': 'https://azure-api.sportsdata.io/v3/nhl/scores'}, ], ) @app.get( '/{format}/AllTeams', tags=['team_statistics', 'team_information_management'], 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 <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_schedule_management'], 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=['team_statistics'], 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}/FreeAgents', tags=['player_statistics'], 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_schedule_management'], 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_schedule_management'], 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=['news_fetching'], 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=['news_fetching'], 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=['news_fetching', 'player_statistics'], 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_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}/Players', tags=['player_statistics', 'team_information_management'], 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=['team_statistics', 'team_information_management'], 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}/Stadiums', tags=['team_information_management'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def stadiums(format: Format12 = 'xml'): """ Stadiums """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/Standings/{season}', tags=['team_statistics', 'team_information_management'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def standings(format: Format13 = 'XML', season: str = ...): """ Standings """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/TeamGameStatsByDate/{date}', tags=['team_statistics', 'game_schedule_management'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def team_game_stats_by_date(format: Format13 = '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}', tags=['team_statistics'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def team_game_logs_by_season( format: Format13 = '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_statistics'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def team_season_stats(format: Format13 = 'XML', season: str = ...): """ Team Season Stats """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/teams', tags=['team_information_management', 'team_statistics'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def teams_active(format: Format13 = '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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/nhl-v3-scores'

If you have feedback or need assistance with the MCP directory API, please join our Discord server