mcp-stockfish

shelajev/mcp-stockfish

3.3

If you are the rightful owner of mcp-stockfish and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This project provides a Model Control Protocol (MCP) server for Stockfish, enabling interaction with the chess engine via HTTP requests.

The MCP Server for Stockfish is a robust solution designed to facilitate seamless interaction with the Stockfish chess engine through HTTP requests. This server is built using Java and Docker, ensuring a containerized environment that is both scalable and easy to deploy. By leveraging the power of Stockfish, users can perform advanced chess analysis, including finding the best moves and evaluating game sequences. Additionally, the server integrates with popular chess platforms like Lichess, allowing users to fetch game data and visualize chess positions. The inclusion of the Maia chess engine further enhances the server's capabilities by predicting human-like moves based on different rating levels. This project is ideal for developers and chess enthusiasts looking to integrate sophisticated chess analysis into their applications or platforms.

Features

  • HTTP-based interaction with Stockfish for chess analysis
  • Containerized deployment using Docker for scalability
  • Integration with Lichess for fetching and analyzing games
  • Support for Maia engine to predict human-like moves
  • Visualization of chess positions from FEN notation

Usages

docker with local development

docker run -p8080:8080 shelajev/mcp-stockfish:0.0.1

docker with prebuilt version

docker run -p8080:8080 olegselajev241/mcp-chess:latest

http connection

http://localhost:8080/mcp

Tools

  1. findBestMove

    Analyzes a chess position using the Stockfish engine to find the best move.

  2. analyzeGame

    Analyzes a sequence of chess moves and returns evaluations for each position.

  3. lastGames

    Fetches the last games from lichess.org by a given username.

  4. randomGame

    Fetches a random game from lichess.org by a given username.

  5. boardFromFen

    Returns a text visualization of a chess board from a position given in FEN notation.

  6. whatMoveWouldHumanPlay

    Uses the Maia chess engine to predict what move a human player would make in a given position.