MCP Chess.com Server
Provides access to Chess.com's public API, allowing AI assistants to fetch player information and statistics.
README
MCP Chess.com Server
A Model Context Protocol (MCP) server that provides access to Chess.com's public API, allowing AI assistants to fetch player information and statistics.
Features
- Player Information: Get detailed player profiles including usernames, ratings, and account information
- Player Statistics: Retrieve comprehensive game statistics including ratings across different time controls
- MCP Integration: Seamlessly integrates with MCP-compatible AI assistants like Claude
Installation
Prerequisites
- Python 3.10 or higher
uvpackage manager (recommended) orpip
Setup Instructions
-
Initialize the project:
uv init -
Create and activate virtual environment:
uv venv .\.venv\Scripts\activate # Windows # or source .venv/bin/activate # Linux/macOS -
Install dependencies:
uv add mcp[cli] uv sync -
Test the server:
uv run chess
Project Structure
mcp-server-chess-com/
├── src/
│ └── chess/
│ ├── __init__.py
│ ├── chess_api.py # Chess.com API client
│ └── server.py # MCP server implementation
├── pyproject.toml # Project configuration
├── uv.lock # Dependency lock file
└── README.md # This file
Configuration
MCP Client Setup (Claude/Cline)
To use this server with Claude via Cline, update your MCP settings:
-
Locate the MCP settings file:
- Path:
~/.config/claude-desktop/claude_desktop_config.json(macOS/Linux) - Path:
%APPDATA%\Claude\claude_desktop_config.json(Windows) - Or for Cline:
cline_mcp_settings.json
- Path:
-
Add the server configuration:
{ "mcpServers": { "server": { "command": "uv", "args": [ "--directory", "BASE_PATH_TO_MCP_PROJECT\\mcp-server-chess-com", "run", "chess" ] } } }Note: Replace
BASE_PATH_TO_MCP_PROJECTwith the actual path to your project directory. -
Restart your MCP client to load the new server.
-
Verify the server is loaded: After restarting, you should see the server listed in your MCP Servers panel as shown below:

The server should appear as "server" with a green status indicator, showing it's successfully connected and ready to use.
Usage
Once configured, you can interact with the Chess.com API through your MCP client:
Available Tools
get_chess_player_info
Retrieves basic player information.
Parameters:
username(string): Chess.com username
Example queries:
- "What is the player details for Hikaru?"
- "Get information about Magnus Carlsen's Chess.com profile"
- "Show me details for the player 'GMHikaru'"
get_chess_player_stats
Retrieves detailed player statistics including ratings.
Parameters:
username(string): Chess.com username
Example queries:
- "What are Hikaru's current ratings?"
- "Show me Magnus Carlsen's chess statistics"
- "Get the rating statistics for player 'GMHikaru'"
Sample Interactions
Here's an example of how the MCP server works in practice:

The screenshot above shows a real interaction where:
- User Query: "What is the player details for Hikaru?"
- MCP Tool Called:
get_chess_player_info - Arguments:
{"username": "GMHikaru"} - Response: Complete player profile data from Chess.com
- Token Usage: Shows input/output tokens and cost per interaction
- Performance: Demonstrates real-time API response with detailed player information
User: "What is the player details for Hikaru?"
Assistant: [Calls get_chess_player_info with username "GMHikaru"]
User: "What are Magnus Carlsen's current ratings?"
Assistant: [Calls get_chess_player_stats with username "MagnusCarlsen"]
API Reference
Chess.com API Endpoints Used
- Player Profile:
https://api.chess.com/pub/player/{username} - Player Stats:
https://api.chess.com/pub/player/{username}/stats
Response Format
The server returns JSON data directly from Chess.com's API, including:
Player Info Response:
- Player details (username, title, followers, etc.)
- Account status and verification
- Profile URLs and avatars
Player Stats Response:
- Current ratings for different time controls (bullet, blitz, rapid, daily)
- Game statistics (wins, losses, draws)
- Performance metrics
Development
Building the Project
# Install in development mode
uv sync
# Run the server
uv run chess
# Run with debugging
uv run chess --debug
Project Configuration
The project uses the following key configurations in pyproject.toml:
[project]
name = "mcp-server-chess-com"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"mcp[cli]>=1.13.1",
"requests>=2.25.0",
]
[project.scripts]
chess = "chess.server:main"
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir= {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
Dependencies
- mcp[cli] (>=1.13.1): Model Context Protocol framework
- requests (>=2.25.0): HTTP client for Chess.com API calls
Error Handling
The server includes robust error handling for:
- Invalid usernames
- API rate limiting
- Network connectivity issues
- Chess.com API downtime
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Chess.com for providing the public API
- The MCP community for the excellent protocol and tools
- FastMCP for simplifying MCP server development
Support
For issues and questions:
- Check Chess.com's API documentation: https://www.chess.com/news/view/published-data-api
- Review MCP documentation: https://spec.modelcontextprotocol.io/
- Open an issue in this repository
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.