Allows fetching player profiles, stats, game archives, and titled players from Chess.com. Enables analysis of rating trends, game patterns, opening statistics, and player activity data through cached Chess.com API responses.
Used for caching Chess.com API data and providing SQL analytics capabilities, enabling custom queries on game data, player statistics, and rating histories.
Chess MXCP Server
An enterprise-grade Chess.com MCP server built with MXCP, featuring caching, analytics, audit trails, and advanced data analysis capabilities.
Features
🚀 Core Chess.com API Integration
- Player Tools: Profile, stats, online status, current games, game archives
- Game Tools: Monthly games, PGN downloads with caching
- Titled Players: List players by title (GM, IM, FM, etc.)
- Club Tools: Club profiles and member lists
💎 Enterprise Features (MXCP Advantages)
- Smart Caching: Configurable TTLs for different data types
- Rate Limiting: Token bucket algorithm to respect API limits
- Connection Pooling: Efficient HTTP client with keepalive
- Retry Logic: Automatic retries with exponential backoff
- Audit Trails: Track all API usage and queries
- Error Handling: Graceful degradation and detailed error messages
📊 Advanced Analytics (Not Available in Original)
- Rating Trends: Analyze player rating changes over time
- Game Analysis: Win/loss/draw patterns by time control and color
- Opening Statistics: Most played openings and success rates
- Activity Patterns: When players are most active
- Trending Players: Track popular players and follower growth
- SQL Query Access: Direct SQL access to cached data for custom analysis
🔐 Security & Governance
- Authentication Support: OAuth integration ready
- Audit Logging: Complete API call tracking
- Policy Engine: Fine-grained access control
- Type Safety: Comprehensive validation
Installation
- Install dependencies:
- Initialize the database:
This will create the necessary cache tables automatically.
Usage
Start the Server
Connect to Claude Desktop
The server_config.json
was generated during mxcp init
. Add it to your Claude Desktop configuration.
Example Queries
Ask Claude:
- "Get Magnus Carlsen's profile and analyze his rating trends"
- "Show me all GMs and their recent activity"
- "Analyze my opening repertoire" (after fetching games)
- "Compare win rates between blitz and rapid for a player"
- "Find trending chess players this week"
SQL Analytics
With SQL tools enabled, you can run custom queries:
- "Show me all cached games where I played the Sicilian Defense"
- "What's my performance on Tuesdays vs other days?"
- "List all players whose ratings improved by 100+ points"
Configuration
Edit mxcp-site.yml
to adjust:
- Cache TTLs for different data types
- Rate limiting parameters
- Audit settings
- SQL tool permissions
Architecture
Advanced Features
Caching Strategy
- Player profiles: 1 hour TTL
- Player stats: 30 minutes TTL
- Current games: 5 minutes TTL
- Game archives: 24 hours TTL (historical data)
- Titled players: 7 days TTL
- Individual games: Permanent cache
Analytics Tables
chess_api_cache
: General API response cachechess_games_cache
: Individual game storage with PGNplayer_profile_views
: Track profile access patternsrating_history
: Player rating changes over timeplayer_activity
: Game count trackingaudit_log
: Complete API usage audit trail
Development
Adding New Tools
- Create Python implementation in
python/
- Define tool in
tools/
with YAML - Add SQL analytics if applicable
- Update cache tables if needed
Testing
Why MXCP?
This implementation showcases how MXCP improves upon a basic MCP server:
- Performance: Caching reduces API calls by 90%+
- Analytics: SQL access enables complex analysis impossible with just API
- Reliability: Retry logic and rate limiting prevent failures
- Observability: Audit trails show exactly what's happening
- Extensibility: Easy to add new analytics without touching core code
- Type Safety: Validation prevents runtime errors
- Production Ready: Built for scale from day one
License
MIT
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An enterprise-grade Chess.com MCP server built with MXCP, featuring caching, analytics, audit trails, and advanced data analysis capabilities.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that enables natural language interaction with the Lichess chess platform, allowing users to play games, analyze positions, manage their account, and participate in tournaments through Claude.Last updated -906JavaScriptMIT License
- AsecurityAlicenseAqualityProvides access to Chess.com player data, game records, and public information through standardized MCP interfaces, allowing AI assistants to search and analyze chess information.Last updated -1045PythonMIT License
- -securityAlicense-qualityOpen source MCP server specializing in easy, fast, and secure tools for Databases.Last updated -8,892GoApache 2.0
- AsecurityAlicenseAqualityAn open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.Last updated -1053PythonMIT License