README.md•2.28 kB
# MCP Chess Server
## Overview
This repository provides a Model Context Protocol (MCP) server that exposes Chess.com data through Anthropic's FastMCP framework. The server runs over stdio and can be launched locally or directly from Claude Desktop.
## Capabilities
- `get_chess_player_profile`: Returns the public profile for a Chess.com username by calling `https://api.chess.com/pub/player/{username}` via `requests`.
- `get_chess_player_stats`: Retrieves rating history and performance metrics from `https://api.chess.com/pub/player/{username}/stats`.
Both tools are registered with `FastMCP('Chess.com')` in `chess.server` and are available to any MCP-compatible client once the server is running.
## Prerequisites
- Python 3.13 or newer
- Git
- [uv](https://github.com/astral-sh/uv) for dependency management
- Claude Desktop (or another MCP client)
## Setup
### 1. Clone the repository
```bash
git clone <your-repo-url>
cd mcp-build-chess
```
### 2. Install dependencies in editable mode
```bash
uv pip install -e .
```
> Tip: create an isolated environment with `uv venv .venv` and activate it before installing.
### 3. Validate the server locally
```bash
uv run python -m chess.server
```
The server will start and wait on stdio. Use `Ctrl+C` to stop it once you've confirmed it launches without errors.
## Claude Desktop Integration
Update `claude_desktop_config.json` so Claude Desktop can launch the server from this repository:
## claude coinfiguration form local
```json
{
"mcpServers": {
"Chess_Server": {
"command": "uv",
"args": [
"--directory",
"W:\\ITversity\\MCP Claude\\code\\mcp-build-chess\\src\\chess",
"run",
"chess"
]
}
}
}
```
##claude configuration from git repo
```json
{
"mcpServers": {
"Chess_Server_git": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Ramakrishna-Gedala/mcp_chess.git@main",
"chess-server"
]
}
}
}
```
Replace the `cwd` value with the absolute path to your cloned repository. macOS and Linux users should specify their own path syntax (for example, `/Users/you/src/mcp-build-chess`). After saving the config, restart Claude Desktop so it picks up the new server configuration.