Skip to main content
Glama
YuchengMaUTK

Unofficial WCA MCP Server

by YuchengMaUTK

get_rankings

Retrieve current world rankings and records for WCA speedcubing events, with filtering by region and ranking type to find top performers.

Instructions

Get current world rankings and records for a specific event.

Returns the current rankings for any WCA event, which includes world records and top performers. Can filter by region (world, continent, or country).

Args: event_id: WCA event ID (e.g., "333" for 3x3x3 Cube, "222" for 2x2x2) region: Region code - "world" for world rankings, continent codes like "Europe", or country ISO2 codes like "US", "CN" (default: "world") ranking_type: Type of ranking - "single" for single solve records or "average" for average records (default: "single") page: Page number (1-based, default: 1) per_page: Items per page (max 100, default: 25)

Returns: Paginated ranking data with current records and top performers

Input Schema

NameRequiredDescriptionDefault
event_idYes
pageNo
per_pageNo
ranking_typeNosingle
regionNoworld

Input Schema (JSON Schema)

{ "properties": { "event_id": { "title": "Event Id", "type": "string" }, "page": { "default": 1, "title": "Page", "type": "integer" }, "per_page": { "default": 25, "title": "Per Page", "type": "integer" }, "ranking_type": { "default": "single", "title": "Ranking Type", "type": "string" }, "region": { "default": "world", "title": "Region", "type": "string" } }, "required": [ "event_id" ], "type": "object" }

Implementation Reference

  • MCP tool handler for get_rankings: decorated with @mcp.tool(), defines input parameters, calls WCAAPIClient.get_rankings, handles errors.
    @mcp.tool() async def get_rankings( event_id: str, region: str = "world", ranking_type: str = "single", page: int = 1, per_page: int = 25 ) -> Dict[str, Any]: """Get current world rankings and records for a specific event. Returns the current rankings for any WCA event, which includes world records and top performers. Can filter by region (world, continent, or country). Args: event_id: WCA event ID (e.g., "333" for 3x3x3 Cube, "222" for 2x2x2) region: Region code - "world" for world rankings, continent codes like "Europe", or country ISO2 codes like "US", "CN" (default: "world") ranking_type: Type of ranking - "single" for single solve records or "average" for average records (default: "single") page: Page number (1-based, default: 1) per_page: Items per page (max 100, default: 25) Returns: Paginated ranking data with current records and top performers """ try: async with WCAAPIClient() as client: rankings_data = await client.get_rankings( event_id=event_id, region=region, type=ranking_type, page=page, per_page=per_page ) return rankings_data except APIError as e: raise Exception(f"Failed to get rankings for {event_id}: {e}") except Exception as e: raise Exception(f"Unexpected error getting rankings for {event_id}: {e}")
  • WCAAPIClient helper method that constructs the rankings API endpoint URL and fetches data via _make_request.
    async def get_rankings( self, event_id: str, region: str = "world", type: str = "single", page: int = 1, per_page: int = 25 ) -> Dict[str, Any]: """Get rankings for an event. Args: event_id: Event ID (e.g., "333") region: Region code ("world", continent code, or country ISO2) type: Ranking type ("single" or "average") page: Page number (1-based) per_page: Items per page (max 100) Returns: Paginated ranking data """ # The static API uses a specific URL format: rank/{region}/{type}/{event}.json return await self._make_request(f"rank/{region}/{type}/{event_id}.json")

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/YuchengMaUTK/unofficial-wca-mcp-server'

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