Skip to main content
Glama
YuchengMaUTK

Unofficial WCA MCP Server

by YuchengMaUTK

get_wca_countries

Retrieve a complete list of countries recognized by the World Cube Association with their names and ISO2 codes for regional filtering in speedcubing data queries.

Instructions

Get all WCA countries.

Returns a list of all countries recognized by the World Cube Association including country names and ISO2 codes used for regional filtering.

Returns: List of WCA countries with names and ISO2 codes

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The handler function for the 'get_wca_countries' tool, decorated with @mcp.tool() which registers it with the MCP server. It fetches the list of WCA countries by calling WCAAPIClient.get_countries() and handles errors.
    @mcp.tool() async def get_wca_countries() -> List[Dict[str, Any]]: """Get all WCA countries. Returns a list of all countries recognized by the World Cube Association including country names and ISO2 codes used for regional filtering. Returns: List of WCA countries with names and ISO2 codes """ try: async with WCAAPIClient() as client: countries = await client.get_countries() return countries except APIError as e: raise Exception(f"Failed to fetch WCA countries: {e}") except Exception as e: raise Exception(f"Unexpected error fetching WCA countries: {e}")
  • Supporting method in WCAAPIClient class that makes the HTTP request to the WCA API endpoint 'countries.json' and extracts the countries list from the response.
    async def get_countries(self) -> List[Dict[str, Any]]: """Get all countries. Returns: List of country data """ data = await self._make_request("countries.json") # The API returns paginated data with items array if isinstance(data, dict) and "items" in data: return data["items"] return data.get("countries", [])

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