Skip to main content
Glama

League of Legends Stats MCP Server

main.py11.1 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T09:37:32+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 ( CompetitionDetail, FieldFormatActiveMembershipsGetResponse, FieldFormatAreasGetResponse, FieldFormatBoxScoreGameidGetResponse, FieldFormatBoxScoresDateGetResponse, FieldFormatChampionsGetResponse, FieldFormatCompetitionsGetResponse, FieldFormatGamesByDateDateGetResponse, FieldFormatHistoricalMembershipsByTeamTeamidGetResponse, FieldFormatHistoricalMembershipsGetResponse, FieldFormatItemsGetResponse, FieldFormatMembershipsByTeamTeamidGetResponse, FieldFormatPlayersByTeamTeamidGetResponse, FieldFormatPlayersGetResponse, FieldFormatScheduleRoundidGetResponse, FieldFormatSeasonTeamsSeasonidGetResponse, FieldFormatSpellsGetResponse, FieldFormatStandingsRoundidGetResponse, FieldFormatTeamsGetResponse, FieldFormatVenuesGetResponse, Format, Player, ) app = MCPProxy( contact={'x-twitter': 'nfldata'}, description='LoL v3 Stats', title='LoL v3 Stats', version='1.0', servers=[ {'url': 'http://azure-api.sportsdata.io/v3/lol/stats'}, {'url': 'https://azure-api.sportsdata.io/v3/lol/stats'}, ], ) @app.get( '/{format}/ActiveMemberships', description=""" Memberships (Active) """, 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', description=""" Areas (Countries) """, tags=['geographic_areas_management'], 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}/BoxScore/{gameid}', description=""" Games by Date """, tags=['game_data_retrieval', 'competition_overview'], 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}', description=""" Games by Date """, tags=['game_data_retrieval', 'competition_overview'], 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}/Champions', description=""" Areas (Countries) """, tags=['competition_overview', 'team_data_operations'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def champions(format: Format = 'xml'): """ Champions """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/CompetitionDetails/{competitionid}', description=""" Competition Fixtures (League Details) """, tags=['competition_overview', 'game_data_retrieval'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def competition_fixtures_league_details( format: Format = 'xml', competitionid: str = ... ): """ Competition Fixtures (League Details) """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/Competitions', description=""" Competitions (Leagues) """, tags=['competition_overview', 'team_data_operations'], 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}', description=""" Games by Date """, tags=['game_data_retrieval', 'competition_overview'], 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', description=""" Memberships (Historical) """, 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}/HistoricalMembershipsByTeam/{teamid}', description=""" Memberships by Team (Historical) """, tags=['membership_management', 'team_data_operations'], 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}/Items', description=""" Competitions (Leagues) """, tags=['item_inventory_management'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def items(format: Format = 'xml'): """ Items """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/MembershipsByTeam/{teamid}', description=""" Memberships by Team (Active) """, tags=['membership_management', 'team_data_operations'], 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}', description=""" Player """, tags=['player_statistics'], 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', description=""" Players """, tags=['player_statistics', 'team_data_operations'], 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}', description=""" Players by Team """, tags=['team_data_operations', 'player_statistics'], 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}/Schedule/{roundid}', description=""" Schedule """, tags=['competition_overview', 'game_data_retrieval'], 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}', description=""" Season Teams """, tags=['team_data_operations', 'competition_overview'], 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}/Spells', description=""" Areas (Countries) """, tags=['spell_operations'], security=[ APIKeyHeader(name="Ocp-Apim-Subscription-Key"), APIKeyQuery(name="key"), ], ) def spells(format: Format = 'xml'): """ Spells """ raise RuntimeError("Should be patched by MCPProxy and never executed") @app.get( '/{format}/Standings/{roundid}', description=""" Standings """, tags=['competition_overview', 'team_data_operations'], 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}/Teams', description=""" Teams """, tags=['membership_management', 'team_data_operations'], 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}/Venues', description=""" Venues """, tags=['venue_information_management'], 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)

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/lol-v3-stats'

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