Reconnaissance Blind Chess MCP Server

Reconnaissance Blind Chess MCP Server

Enables humans and LLMs to play Reconnaissance Blind Chess (a chess variant with limited vision) locally against AI bots or remotely on the official RBC server at rbc.jhuapl.edu.

Category
访问服务器

README

Reconnaissance Blind Chess MCP Server

A Model Context Protocol (MCP) server that enables humans and LLMs to play Reconnaissance Blind Chess (RBC) both locally against AI bots and remotely on the official RBC server at rbc.jhuapl.edu.

What is Reconnaissance Blind Chess?

Reconnaissance Blind Chess is a variant of chess where you can only see your own pieces. Key rules:

  • Limited Vision: You only see your own pieces, not your opponent's
  • Sensing Phase: Each turn, you can sense a 3x3 area to discover opponent pieces
  • Move Phase: Make a move based on your incomplete knowledge
  • Capture to Win: The goal is to capture the opponent's king (not checkmate)
  • Check Rules Removed: You can move into check, castle through check, etc.

For complete rules, see: https://reconchess.readthedocs.io/en/latest/rules.html

Features

  • Play local games against three different AI bots:
    • RandomBot: Plays random legal moves
    • AttackerBot: Prefers capturing moves and senses in opponent territory
    • TroutBot: Actively seeks and tracks the opponent's king
  • Connect to remote games on rbc.jhuapl.edu
  • Full MCP tool integration for Claude and other LLM clients
  • Game state tracking with turn-by-turn information
  • Asynchronous game execution in background threads

Installation

Prerequisites

  • Python 3.9 or higher
  • pip or pip3

Setup

  1. Clone or download this repository

  2. Create a virtual environment and install dependencies:

cd rbc_mcp_server
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Verify installation:
python3 rbc_mcp_server.py --version

Usage

Running the MCP Server

The MCP server communicates via stdio and is designed to be used with MCP clients like Claude Desktop.

To run standalone (for testing):

source venv/bin/activate
python3 rbc_mcp_server.py

Configuring with Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "rbc": {
      "command": "/Users/YOUR_USERNAME/projects/rbc_mcp_server/venv/bin/python3",
      "args": ["/Users/YOUR_USERNAME/projects/rbc_mcp_server/rbc_mcp_server.py"]
    }
  }
}

Replace /Users/YOUR_USERNAME/projects/rbc_mcp_server with your actual path.

MCP Tools

Local Game Tools

create_local_game

Create and start a new local game against a bot.

Parameters:

  • bot_type (optional): "random", "attacker", or "trout" (default: "random")
  • color (optional): "white", "black", or "random" (default: "random")

Returns: Game ID and initial game information

get_game_status

Get the current status of a game.

Parameters:

  • game_id: The game ID

Returns: Game status including whether it's waiting for your input

get_board_state

Get your current view of the board (only pieces you can see).

Parameters:

  • game_id: The game ID

Returns: Board FEN and unicode representation

choose_sense

Choose a square to sense (reveals 3x3 area).

Parameters:

  • game_id: The game ID
  • square: Square name (e.g., "e4", "d5") or "pass"

choose_move

Choose a move to make.

Parameters:

  • game_id: The game ID
  • move: Move in UCI format (e.g., "e2e4") or "pass"

get_sense_result

Get the result of your last sense action.

get_move_result

Get the result of your last move.

get_opponent_move_info

Get information about opponent's last move.

list_local_games

List all active local game IDs.

delete_local_game

Delete a game and free its resources.

Remote Game Tools

create_remote_game

Connect to a game on rbc.jhuapl.edu.

Parameters:

  • server_url (optional): Server URL (default: "https://rbc.jhuapl.edu")
  • auth_token: Base64 encoded authentication token
  • remote_game_id: Game ID on the remote server

get_remote_game_status

Get the status of a remote game.

list_remote_games

List all active remote game sessions.

delete_remote_game

Delete a remote game session.

Example Game Flow

Here's how a typical game works:

  1. Create a game:
create_local_game(bot_type="trout", color="white")
→ Returns game_id: 1
  1. Check status (repeat until waiting_for_sense is true):
get_game_status(game_id=1)
→ waiting_for_sense: true
  1. Sense the board:
choose_sense(game_id=1, square="e4")
get_sense_result(game_id=1)
→ Shows 3x3 area around e4
  1. Check status (repeat until waiting_for_move is true):
get_game_status(game_id=1)
→ waiting_for_move: true
  1. Make a move:
choose_move(game_id=1, move="e2e4")
get_move_result(game_id=1)
→ Shows if move succeeded and if you captured anything
  1. Repeat steps 2-5 until game is over

Playing on Remote Server

To play on the official RBC server at rbc.jhuapl.edu:

  1. Authentication: Use the provided token: bWNwX3JiYzpCZWF6ZXJCMzNz

  2. Get a game ID: You'll need to create or join a game on the RBC server (outside of this MCP)

  3. Connect:

create_remote_game(
  auth_token="bWNwX3JiYzpCZWF6ZXJCMzNz",
  remote_game_id="YOUR_GAME_ID"
)
  1. Play: Use the same sense/move flow as local games

Architecture

The server is structured as follows:

  • Bot Players: Three AI opponents implementing the reconchess Player interface
  • Human Player: Interactive player that waits for MCP tool calls
  • Game Manager: Manages multiple concurrent games (local and remote)
  • Background Threads: Games run asynchronously to avoid blocking the MCP server
  • MCP Server: Provides tools for game interaction

Dependencies

  • reconchess>=1.0.0 - Official Reconnaissance Blind Chess library
  • python-chess>=1.0.0 - Chess logic and board representation
  • mcp>=0.1.0 - Model Context Protocol SDK
  • httpx>=0.24.0 - HTTP client for remote games

Game Rules Reference

From the official documentation:

Turn Structure

Each turn has three phases:

  1. Opponent Move Notification: Learn if opponent captured your piece
  2. Sense Phase: Choose a square to sense (3x3 area)
  3. Move Phase: Make your move

Move Execution

  • Moves must be legal on the true board
  • Sliding pieces (Q, R, B) capture if blocked by opponent
  • Pawns moving 2 squares move 1 if blocked
  • Illegal moves result in passing

Winning

  • Capture the opponent's king to win
  • No checkmate rules
  • Games can end by timeout or other conditions

Troubleshooting

"reconchess could not be resolved"

Make sure you've activated the virtual environment:

source venv/bin/activate

Game not responding

Check the game status to see if it's waiting for your input:

get_game_status(game_id=1)

Remote game connection issues

Verify:

  1. You have the correct authentication token
  2. The game ID exists on the server
  3. The game hasn't already started or finished

License

This project uses the reconchess library and follows its licensing terms.

References

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选