Skip to main content
Glama
chesscom-mcp

chesscom-mcp

by brettadams0

chesscom-mcp

CI Surface checked by mcp-surface License: MIT Node

An MCP server over the Chess.com public data API. Read-only, and the upstream API needs no authentication — there is no token to manage and nothing to expire, which makes this the simplest of the set.

9 tools. Runs locally over stdio.

Tools

Tool

Purpose

chess_get_profile

Public profile — name, title, country, followers, join date

chess_get_stats

Ratings and W/L/D per format (bullet, blitz, rapid, daily, puzzles)

chess_get_current_games

Daily/correspondence games in progress; onlyMyTurn filters to games awaiting a move

chess_get_game_archives

Index of available monthly archive URLs for a player

chess_get_games_by_month

Every game a player completed in a given month — summarised, optionally filtered by time class, with PGNs on request

chess_get_titled_players

Usernames holding a given title (GM, IM, FM, …)

chess_get_leaderboards

Current Chess.com leaderboards across all categories

chess_get_club

Club profile by URL-ID

chess_get_clubs

Clubs a given player belongs to

Every tool is annotated readOnlyHint: true. The exact schemas the model sees are in mcp-surface.json.

Related MCP server: Chess MCP Server

Design notes

A month of games is too big to hand a model whole

The archive endpoint returns every game a player finished in a month, each with its full PGN, the same moves again in Chess.com's compact tcn encoding, and the final position. For an active player that is a lot: one titled player's September 2026 archive is 509 games, which this server used to return as 2.27 MB of indented JSON. MCP clients cap tool output far below that, so the model received a truncated fragment of JSON and answered from whatever happened to fit.

Most questions — how did I do this month, who beat me, what did I play most? — need the players, ratings, results, opening and a link, not the moves. So chess_get_games_by_month now returns a summary of each game by default, dropping the move records and the UUIDs and API self-links that duplicate the usernames, and takes a timeClass filter:

Same archive

Size

As this server used to return it (indented)

2.27 MB

As the API sends it

2.13 MB

Summarised

238 KB

Summarised, timeClass: "blitz"

137 KB

includePgn: true returns the games in full when the moves themselves are the point. Results from every tool are compact JSON rather than indented, since indentation is pure token cost once it reaches the model.

Usernames are validated, not just encoded

Usernames and club ids go straight into the request path, and encodeURIComponent leaves .. alone — so ../titled/GM would quietly answer a different question. Each is checked against the characters Chess.com allows, which also turns a display name with a space in it into an error that says to use the handle.

Running it

Requires Node 20+.

npm ci
npm start        # stdio server; expects an MCP client on the other end

Claude Code:

claude mcp add chesscom -- node /absolute/path/to/chesscom-mcp/src/index.js

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "chesscom": {
      "command": "node",
      "args": ["/absolute/path/to/chesscom-mcp/src/index.js"]
    }
  }
}

Development

npm test               # unit tests — no network
npm run lint           # ESLint
npm run surface        # start the server and diff its tool surface against mcp-surface.json
npm run surface:update # re-record mcp-surface.json after an intended change

With no auth to stub, the tests drive the tool handlers end to end against a stubbed fetch: request URLs and headers, game summaries and filtering, compact output, path validation, and the 404, 429, 5xx and timeout paths. CI runs them on Node 20, 22 and 24, then starts the server with mcp-surface and fails if the tool surface differs from the committed snapshot.

Layout

src/shared.js    version, timeouts, error shaping, tool-result helpers
src/client.js    fetch wrapper over api.chess.com/pub, User-Agent, path validation
src/chess.js     game summaries and all nine tool registrations
src/index.js     McpServer construction + stdio transport
mcp-surface.json the committed tool surface CI compares against

Notes

  • Chess.com asks API consumers to identify themselves; the User-Agent carries the app name, version and a contact address.

  • The upstream API serves cached responses and allows unlimited serial requests, but may rate-limit parallel ones. A 429 is reported with the Retry-After it sends; every request has a 30-second timeout.

  • credentials/ and .env are gitignored on principle even though this server has no secrets — so that adding auth later can't leak one by accident.

License

MIT — see LICENSE. Changes are recorded in CHANGELOG.md.

Available Tools

9 tools
chess_get_clubGet club detailsA

Details for a club, identified by its URL id (the slug in chess.com/club/).

Inputs: urlId (required).

chess_get_clubsGet a player's clubsC

Clubs a given username belongs to.

Inputs: username (required).

chess_get_current_gamesGet in-progress daily gamesC

Daily (correspondence) games a player currently has in progress.

Inputs: username (required), onlyMyTurn.

chess_get_game_archivesList monthly game archive URLsB

List of monthly archive URLs available for a player, going back to when they started playing.

Inputs: username (required).

chess_get_games_by_monthGet games played in a given monthB

All games (rated + casual, all formats) a player completed in a specific year/month.

Inputs: year (required), month (required), username (required).

chess_get_leaderboardsGet global leaderboardsB

Top players across daily/live formats and tactics/puzzle-rush leaderboards.

Inputs: no named parameters.

chess_get_profileGet Chess.com player profileB

Public profile info (name, title, country, followers, join date) for a Chess.com username.

Inputs: username (required).

chess_get_statsGet Chess.com player statsB

Rating and win/loss/draw stats per game format (bullet, blitz, rapid, daily, puzzles) for a username.

Inputs: username (required).

chess_get_titled_playersList titled playersA

Usernames of all players holding a given title (e.g. GM, IM, FM, WGM, NM).

Inputs: title (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of Chess.com data: titled players, leaderboards, profiles, stats, current games, archives, games by month, and clubs. No ambiguity.

    Naming Consistency5/5

    All tools follow a consistent 'chess_get_<noun>' pattern in snake_case, making them predictable and easy to select.

    Tool Count5/5

    9 tools is well-scoped for a chess server, covering player info, games, and clubs without excess or deficiency.

    Completeness4/5

    Covers most essential areas (profiles, stats, games, clubs), but misses puzzle/rush data and tournament info, which are minor gaps.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Provides Chess.com player data integration, enabling AI assistants to fetch real-time chess player profiles and comprehensive statistics including ratings, game counts, and performance metrics from Chess.com's public API.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to explore player profiles, ratings, game archives, leaderboards, clubs, and puzzles via the Chess.com API.
      2
      MIT
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides access to Chess.com's public API, allowing AI assistants to fetch player information and statistics.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying Chess.com player profiles, ratings, game histories, and leaderboard rankings through a natural language MCP interface.
      72 npm
      MIT