stepbot/StockfishMcp
If you are the rightful owner of StockfishMcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Stockfish MCP Server allows an LLM to play chess against the Stockfish engine using the Model Context Protocol.
Stockfish MCP Server
A Stockfish server for the Model Context Protocol. This package allows a Large Language Model to play chess against the Stockfish engine.
Installation
This package is a pure Python wrapper and requires you to provide your own Stockfish binary.
-
Download Stockfish: Get the appropriate version for your system from the official Stockfish website.
-
Install the MCP Server: We recommend using
uvto install the package. First, installuv. Then, run the following command to installstockfish-mcpas a globally available command-line tool in its own isolated environment:uv tool install stockfish-mcp
Usage
There are two ways to run the server:
1. Command Line
You can run the server directly, providing the path to your downloaded Stockfish executable.
uv tool run stockfish-mcp --stockfish-path C:\path\to\your\stockfish.exe
2. MCP Configuration
Alternatively, you can add it to your MCP settings.json file. This is useful for integrating with clients like the MCP VS Code extension.
{
"mcpServers": {
"stockfish": {
"command": "uv",
"args": ["tool", "run", "stockfish-mcp", "--stockfish-path", "C:\\path\\to\\your\\stockfish.exe"]
}
}
}
Example
An example of a game played against the Stockfish engine can be found in .
Available Tools
get_board_state(): Get the current board state.make_move(move_uci: str): Make a move (e.g., "e2e4").is_game_over(): Check if the game has ended.get_game_result(): Get the result if the game is over.reset_game(skill_level: int = 10): Start a new game.