
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.
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")MCP_STOCKFISH_HTTP_HOST
: HTTP host (default: "localhost")MCP_STOCKFISH_HTTP_PORT
: HTTP port (default: 8080)
Stockfish 🐟 Configuration
MCP_STOCKFISH_PATH
: Path to Stockfish binary (default: "stockfish")MCP_STOCKFISH_MAX_SESSIONS
: Max concurrent sessions (default: 10)MCP_STOCKFISH_SESSION_TIMEOUT
: Session timeout (default: "30m")MCP_STOCKFISH_COMMAND_TIMEOUT
: Command timeout (default: "30s")
Logging
MCP_STOCKFISH_LOG_LEVEL
: debug, info, warn, error, fatalMCP_STOCKFISH_LOG_FORMAT
: json, consoleMCP_STOCKFISH_LOG_OUTPUT
: stdout, stderr
Tool Parameters
command
: UCI command to executesession_id
: Session ID (optional, we'll make one up if you don't)
Response Format
{
"status": "success|error",
"session_id": "some-uuid",
"command": "what you asked for",
"response": ["what stockfish said"],
"error": "what went wrong (if anything)"
}
Session Management
Sessions do what you'd expect:
- Spawn Stockfish processes on demand
- Keep UCI state between commands
- Clean up when you're done (or when they timeout)
- Enforce limits so you don't fork-bomb yourself
Integration
Claude Desktop
{
"mcpServers": {
"chess": {
"command": "mcp-stockfish",
"env": {
"MCP_STOCKFISH_LOG_LEVEL": "info"
}
}
}
}
Development
make deps # Get dependencies
make build # Build the thing
make test # Run tests (when they exist)
make fmt # Make it pretty
Credits 🐟
Powered by Stockfish, the chess engine that's stronger than both of us combined. Created by people who actually understand chess, unlike this wrapper.
Thanks to:
- The Stockfish team for making chess engines that don't suck
- MCP SDK for Go for handling the protocol so I don't have to
- Coffee
License
MIT - Do whatever you want, just don't blame me when it breaks.
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。