ChessAgine MCP

ChessAgine MCP

Enables comprehensive chess analysis through Stockfish engine integration, positional evaluation, puzzle training, game review, and access to extensive chess databases. Provides visual board rendering, interactive game viewers, and tactical puzzle training with 3+ million problems from Lichess.

Category
访问服务器

README

ChessAgine MCP

<p align="center"> <img src="/icon.png" alt="ChessAgine" width="200"/> </p>

A comprehensive Model Context Protocol (MCP) server that provides advanced chess analysis capabilities by implementing Chess Context Protocol Server and integrating Stockfish engine evaluation, positional theme analysis, opening databases, puzzle training, game visualization, and chess knowledge for enhanced chess understanding and gameplay improvement.

Preview

<p align="center"> <img src="/assets/screenshots/claude2.png" alt="ChessAgine"/> </p>

Features

🔧 Core Analysis Tools

  • Stockfish Integration: Deep engine analysis with configurable search depth
  • Theme Analysis: Evaluate material, mobility, space, positional factors, and king safety
  • Variation Analysis: Compare multiple lines and track positional changes
  • Move Validation: Check move legality and generate board state descriptions
  • Game Review: Comprehensive game analysis with theme progression and critical moments

🎮 Interactive Features

  • Visual Board Rendering: Generate HTML chess boards for any position
  • Dynamic Game Viewer: Interactive game replay with move navigation
  • Puzzle Training: Access Lichess puzzle database with theme filtering
  • Game Fetching: Retrieve user games from Lichess for analysis

📊 Database Integration

  • Lichess Master Games: Access master-level opening statistics and games
  • Lichess User Games: Analyze how positions are played across skill levels
  • Lichess Puzzle Database: 3+ million tactical puzzles with theme-based filtering
  • ChessDB: Query extensive game databases for move evaluations and statistics

🧠 Knowledge Base

  • Chess Principles: Silman's imbalances and Fine's 30 principles
  • Endgame Theory: Essential endgame knowledge and patterns
  • Strategic Concepts: Comprehensive chess improvement guidelines
  • Puzzle Themes: 150+ tactical motifs and patterns

Installation

Option 1: Using MCPB File (Recommended)

Download the chessagine-mcp.mcpb file and install it directly in Claude Desktop:

  1. Download the latest release from GitHub releases
  2. Open Claude Desktop
  3. Go to Settings → Extensions → Install from file
  4. Select the chessagine-mcp.mcpb file
  5. Restart Claude Desktop

Option 2: Local Development Setup

Prerequisites

  • Node.js 20+
  • npm or yarn package manager

Clone and Setup

git clone https://github.com/jalpp/chessagine-mcp.git
cd chessagine-mcp
npm install
npm run build

Configure Claude Desktop

Add to your claude_desktop_config.json:

macOS/Linux:

{
  "mcpServers": {
    "chessagine-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/chessagine-mcp/build/mastra/stdio.js"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "chessagine-mcp": {
      "command": "node", 
      "args": ["C:\\absolute\\path\\to\\chessagine-mcp\\build\\mastra\\stdio.js"]
    }
  }
}

Usage Examples

Basic Position Analysis

Analyze this position: rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1

Visual Board Display

Show me the board for this position: r1bqkbnr/pppp1ppp/2n5/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2 3

Game Review

Review this game and identify critical moments:
[Event "Casual Game"]
[White "Player1"]
[Black "Player2"]
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6...

Puzzle Training

Give me a tactical puzzle rated between 1500-1800 with a fork theme

Fetch User Games

Show me the recent games for Lichess user "Magnus_Carlsen"

Interactive Game Viewer

Create an interactive viewer for this game: https://lichess.org/abc12345

Opening Exploration

What are the master games for the Sicilian Defense after 1.e4 c5 2.Nf3 d6?

Engine Analysis

Run Stockfish analysis on this position at depth 15: r1bqk2r/pppp1ppp/2n2n2/2b1p3/2B1P3/3P1N2/PPP2PPP/RNBQK2R w KQkq - 4 5

Variation Comparison

Compare these variations from the starting position:
1. e4 e5 2.Nf3 Nc6 3.Bb5
2. e4 e5 2.Nf3 Nc6 3.Bc4
3. e4 e5 2.Nf3 Nc6 3.d4

Theme Analysis

Analyze how the king safety theme changes in this line: 1.e4 e5 2.f4 exf4 3.Bc4 Qh4+ 4.Kf1

Available Tools

Tool Description
Position Analysis
get-theme-scores Analyze positional themes for strategic evaluation
analyze-variation-themes Track theme evolution across move sequences
get-theme-progression Monitor specific theme development
compare-variations Side-by-side variation analysis
find-critical-moments Identify key turning points
Engine & Evaluation
get-stockfish-analysis Deep engine position analysis
get-stockfish-move-analysis Post-move position evaluation
is-legal-move Move validation
boardstate-to-prompt Convert positions to text descriptions
Knowledge & Database
get-chess-knowledgebase Access comprehensive chess knowledge
get-lichess-master-games Master game database queries
get-lichess-games User game statistics
get-chessdb-analysis ChessDB position analysis
Visualization
generate-chess-board-view-artifact-using-html Render chess board in HTML
generate-dynamic-gameview-html Create interactive game viewer
Puzzle Training
fetch-chess-puzzle Fetch puzzles from Lichess (filter by theme/rating)
get-puzzle-themes List all available puzzle themes
Game Analysis
fetch-lichess-games Fetch user's 20 most recent games
fetch-lichess-game Fetch specific game by URL or ID
generate-game-review Generate detailed game review with themes
parse-pgn-into-fens Convert PGN to FEN position list

Available Prompts

Prompt Description
analyze-position Comprehensive positional analysis

Puzzle Training Features

ChessAgine MCP now includes access to Lichess's extensive puzzle database with:

  • 3+ Million Puzzles: Tactical problems for all skill levels
  • 150+ Themes: Fork, pin, skewer, mate patterns, endgames, and more
  • Rating Filter: Find puzzles matching your skill level (500-3000+)
  • Theme Combinations: Query multiple themes simultaneously
  • Instant Feedback: Validate solutions with engine analysis

Popular Puzzle Themes

  • Tactical Motifs: fork, pin, skewer, discoveredAttack, deflection
  • Checkmate Patterns: mateIn1, mateIn2, mateIn3, backRankMate, smotheredMate
  • Endgame Skills: pawnEndgame, rookEndgame, queenEndgame, promotion
  • Strategic Elements: zugzwang, clearance, interference, attraction

Game Review System

The new game review system provides comprehensive analysis:

  • Theme Progression: Track material, mobility, space, positional play, and king safety
  • Critical Moments: Automatically identify turning points in the game
  • Visual Analytics: Generate charts and graphs of theme evolution
  • Format Options: JSON data or human-readable text reports
  • Configurable Threshold: Adjust sensitivity for detecting critical moments

API Integration

The server integrates with several chess APIs:

  • Lichess Explorer API: Opening statistics and master games
  • Lichess Puzzle API: Tactical puzzle database with 3M+ positions
  • Lichess Game API: User game history and specific game fetching
  • ChessDB API: Position analysis and move databases
  • Stockfish API: Engine evaluation and analysis

Development

Building from Source

npm run build:mcp  # Build the project
npm run dev        # Development mode with watch
npm run clean      # Clean build directory

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Stockfish: The powerful chess engine powering analysis
  • Lichess: Open-source chess platform providing game data and puzzles
  • ChessDB: Comprehensive chess position database
  • Anthropic: Model Context Protocol specification and tools

Authors

@jalpp

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选