Skip to main content
Glama
pab1it0

Chess.com MCP Server

get_player_games_by_month

Retrieve a chess player's game records for a specific month from Chess.com to analyze performance, track progress, or review matches.

Instructions

Get a player's games for a specific month from Chess.com

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYes
yearYes
monthYes

Implementation Reference

  • The handler function decorated with @mcp.tool, which registers and implements the tool. It formats the month, logs the request, and calls make_api_request to fetch games from Chess.com API for the given player, year, and month.
    @mcp.tool(description="Get a player's games for a specific month from Chess.com") async def get_player_games_by_month( username: str, year: int, month: int ) -> Dict[str, Any]: """ Get a player's games for a specific month from Chess.com. Args: username: The Chess.com username year: Year (YYYY format) month: Month (MM format, 01-12) Returns: Games data for the specified month """ month_str = str(month).zfill(2) logger.info( "Fetching player games by month", username=username, year=year, month=month_str ) return await make_api_request(f"player/{username}/games/{year}/{month_str}")
  • The @mcp.tool decorator registers the get_player_games_by_month function as an MCP tool.
    @mcp.tool(description="Get a player's games for a specific month from Chess.com")

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/pab1it0/chess-mcp'

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