SM

sonirico/mcp-stockfish

部署与 DevOps

本页由 AI 翻译,技术细节请以原文为准。 查看原文

16 stars 8 forks 质量 58 趋势 21MIT

将 AI 系统连接到 Stockfish 棋盘引擎的 MCP 服务器

概览

一个模式上下文协议服务器,让你的AI和Stockfish交谈. 因为我们显然需要让国际象棋引擎 更方便我们的硅上司使用 你的LLM认为,斯托克鱼计算, 你假装你理解 由此产生的15-运动战术序列。 这通过MCP协议在AI系统与斯托克鱼围棋引擎之间建立了桥梁. 它处理多个并行的会话,因为你的AI可能想要同时分析十七个位置,同时你仍在想为什么你的骑士被吊死. 建于平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平. 因为重塑轮子是给时间太多的人用的.

概述(AI 翻译)

一个模式上下文协议服务器,让你的AI和Stockfish交谈. 因为我们显然需要让国际象棋引擎 更方便我们的硅上司使用

  • 你的LLM认为, 鱼鱼计算, 你假装你理解 由此产生的15-运动战术序列。 *

□ 这是什么?

这通过MCP协议在AI系统与斯托克鱼围棋引擎之间建立了桥梁. 它处理多个并行的会话,因为你的AI可能想要同时分析十七个位置,同时你仍在想为什么你的骑士被吊死.

建于平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平地平. 因为重塑轮子是给时间太多的人用的

□ 特性

  • QQ同步会话**: 运行多个 Stockfish 实例而无需您 CPU 哭泣
  • 完全UCI支持**:所有你需要的命令,没有你不需要的命令
  • 实际工作**: 与您的最后一个侧式工程不同, 这个工程有适当的错误处理
  • JSON所有东西。 因为显然我们不能再用纯文字了
  • Docker Ready**:在你不可避免地打破本地设置时集装箱化

□ 支持 UCI 命令 {}

** 命令** ** 说明** *

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

mcp-stockfish 🐟

A Model Context Protocol server that lets your AI talk to Stockfish. Because apparently we needed to make chess engines even more accessible to our silicon overlords.

🧠⚡🖥️ Your LLM thinks, Stockfish calculates, you pretend you understand the resulting 15-move tactical sequence.

What is this?

This creates a bridge between AI systems and the Stockfish chess engine via the MCP protocol. It handles multiple concurrent sessions because your AI probably wants to analyze seventeen positions simultaneously while you’re still figuring out why your knight is hanging.

Built on mark3labs/mcp-go. Because reinventing wheels is for people with too much time.

Features

  • 🔄 Concurrent Sessions: Run multiple Stockfish instances without your CPU crying
  • ⚡ Full UCI Support: All the commands you need, none of the ones you don’t
  • 🎯 Actually Works: Unlike your last side project, this one has proper error handling
  • 📊 JSON Everything: Because apparently we can’t just use plain text anymore
  • 🐳 Docker Ready: Containerized for when you inevitably break your local setup

Supported UCI Commands ♟️

Command Description
uci Initializes the engine in UCI mode
isready Checks if the engine is ready. Returns readyok
position startpos Sets up the board to the starting position
position fen [FEN] Sets up a position using FEN notation
go Starts the engine to compute the best move
go depth [n] Searches n plies deep. Example: go depth 10
go movetime [ms] Thinks for a fixed amount of time in milliseconds. Example: go movetime 1000
stop Stops current search
quit Closes the session

Quick Start

Installation

git clone https://github.com/sonirico/mcp-stockfish
cd mcp-stockfish
make install

Usage

# Default mode (stdio, because we're old school)
mcp-stockfish

# With custom Stockfish path (for the special snowflakes)
MCP_STOCKFISH_PATH=/your/special/stockfish mcp-stockfish

# HTTP mode (for the web-scale crowd)
MCP_STOCKFISH_SERVER_MODE=http mcp-stockfish

Configuration ⚙️

Environment Variables

Server Configuration

  • MCP_STOCKFISH_SERVER_MODE: “stdio” or “http” (default: “stdio”)
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "chess": { "command": "mcp-stockfish", "env": { "MCP_STOCKFISH_LOG_LEVEL": "info" } } } }