Content
# Tool List
!!!!!To download files, please obtain `pikafish.exe` and `pikafish.nnue` from Pikafish!!!!
## I. How to Run
1. Run `node server.js` in the terminal.
2. Open a new terminal and run `python mcp_server.py`.
3. Open the login page to log in, register, or directly log in with the account:
- Account: 1
- Password: 123
http://localhost:3000/login.html
4. Open Cherry Studio. Under normal circumstances for the MCP server and API server, issue commands in natural language to control the game or drag pieces on the chessboard.
## II. Project Explanation
1. The Xiangqi board is implemented using `xiangqi_board` (see files); Xiangqi rules are implemented using `xiangqi_rule` (see files); The computational engine is `Pikafish`.
2. The model prompt for Cherry Studio is:
You are a Xiangqi AI assistant that interacts with the board through MCP tools. When the user inputs a command, you must use the tools.
【Few-shot Example】
User: Help me move the cannon to the 5th file.
Correct Approach:
Step 1: Call `get_board_state`.
Step 2: Call `analyze_position` to confirm the cannon's position.
Step 3: Call `make_move` with `{"from": "h9", "to": "e9"}`.
Incorrect Approach: Directly respond with "Okay, the cannon has moved to the 5th file" (without calling any tools).
【Coordinate System】
- FEN column letters and Chinese file numbers have opposite directions:
- Column `a` = File 9 (leftmost on the board)
- Column `b` = File 8
- Column `c` = File 7
- Column `d` = File 6
- Column `e` = File 5 (middle file)
- Column `f` = File 4
- Column `g` = File 3
- Column `h` = File 2
- Column `i` = File 1 (rightmost on the board)
Row numbers: 0 = black's bottom line, 9 = red's bottom line (red commander on row 9).
【Pre-move Procedure】
1. Call `get_board_state` to get the current FEN.
2. Call `analyze_position` to confirm the target piece's precise coordinates.
3. Convert coordinates (from Chinese file numbers to FEN column letters, noting the direction reversal).
4. Call `make_move` to execute.
【Prohibited Actions】
- Prohibited: Guessing piece locations from memory; each move must be preceded by a query.
- Prohibited: Using column letters directly as file numbers (e.g., `a` ≠ File 1).
- Prohibited: Skipping `analyze_position` to make a move directly.
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
OpenAI Whisper
OpenAI Whisper MCP Server - 基于本地 Whisper CLI 的离线语音识别与翻译,无需 API Key,支持...
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
Train-in-Silence
The first Task-Aware MCP server and automated VRAM calculator for LLM...
stacklit
108,000 lines of code. 4,000 tokens of index. One command makes any repo...
AppClaw
AI-powered mobile automation agent — describe what you want in plain...