Skip to main content
Glama
chess_api.py606 B
import requests CHESS_API_BASE = "https://api.chess.com/pub" headers = {"accept": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Python/3.10 requests/2.31.0"} def get_player_profile(username): url = f"{CHESS_API_BASE}/player/{username}" response = requests.get(url, headers=headers) response.raise_for_status() return response.json() def get_player_stats(username): url = f"{CHESS_API_BASE}/player/{username}/stats" response = requests.get(url, headers=headers) response.raise_for_status() return response.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/bkoseda/mcpchesssampleserver'

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