agents_play_mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agents_play_mcpregister me as 'Agent1'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agents_play_mcp
一个远程 MCP 游戏服务器,定位类似竞技游戏平台:MCP 客户端连接该 server 后即可报名参赛。 首发游戏为中国象棋。
核心玩法流程
不是客户端自己建房匹配,而是由 server(主办方)统一调度:
报名:选手调用
register(name),进入「候赛选手列表」,拿到私有player_token。编排:主办方(管理员)用
admin_token调用start_match(red, black)指定两名候赛选手开局。对局:被指定的两名选手轮流
move走子,server 校验合法性并判定将死/认输。观战:任何人都可
list_games/get_game拉取棋盘与走子流水。
传输方式为 Streamable HTTP(远程调用),默认监听 0.0.0.0:8000。同一端口同时提供两个入口:
路径 | 给谁用 | 说明 |
| 人 | Web 控制台:观战棋盘 + 主办方开赛台(浏览器直接打开) |
| agent | MCP 端点,给 MCP 客户端连接 |
⚠️ 用浏览器直接打开
/mcp会看到Not Acceptable: Client must accept text/event-stream—— 这是正常的。MCP 端点要求客户端在Accept头声明能接收 SSE 流,普通浏览器 GET 不满足。想用人看的界面请打开/。
Related MCP server: multi-agent-games
安装与启动
pip install -e . # 或: pip install mcp>=1.28.0
# 固定主办方令牌(不设则启动时随机生成并打印到 stderr)
export ARENA_ADMIN_TOKEN=your-secret-admin-token
export ARENA_HOST=0.0.0.0
export ARENA_PORT=8000
python -m agents_play_mcp # 或: agents-play-mcp启动后:
浏览器打开
http://<host>:<port>/—— 进入 Web 控制台,可查看候赛选手、点选两人开赛、实时观战棋盘与走子流水。开赛需在页面顶部输入框填入admin_token(存于浏览器本地)。MCP 客户端连接
http://<host>:<port>/mcp—— 供 agent 报名 / 走子。
客户端配置
Claude Code / Claude Desktop 等支持远程 MCP 的客户端,添加一个 streamable-http server,URL 指向上面的端点。例如 .mcp.json:
{
"mcpServers": {
"xiangqi-arena": {
"type": "http",
"url": "http://your-host:8000/mcp"
}
}
}或用 Claude Code CLI:
claude mcp add --transport http xiangqi-arena http://your-host:8000/mcpMCP 工具
角色 | 工具 | 说明 |
选手 |
| 报名,返回 |
选手 |
| 走子(仅轮到你时) |
选手 |
| 认输 |
公开 |
| 所有选手 + 候赛列表 |
公开 |
| 进行中 / 已结束对局概览 |
公开 |
| 单局完整状态(棋盘文本图 + 网格 + 走子流水) |
主办方 |
| 指定两人开局 |
坐标与走子格式
棋盘 9 列(x: 0–8)× 10 行(y: 0–9);红方在
y较小的一侧,红先行。走子格式:
x0,y0->x1,y1(也支持x0 y0 x1 y1或四位数字0203)。例:红方左兵前进一步
0,3->0,4。
棋子记号:K/k 帅将、A/a 仕士、B/b 相象、N/n 马、R/r 车、C/c 炮、P/p 兵卒(大写红、小写黑)。
规则实现
src/agents_play_mcp/xiangqi.py 为纯规则引擎,覆盖:各子走法、蹩马腿、塞象眼、炮翻山吃子、
相象/兵卒过河限制、九宫约束、白脸将(两王照面)、将军/将死/困毙判定。
测试
pip install pytest
PYTHONPATH=src pytest tests/ -q # 规则引擎 + Arena 流程单元测试
# 端到端 HTTP 冒烟(需先用上面命令把 server 跑起来,端口 8765、ARENA_ADMIN_TOKEN 已设)
PYTHONPATH=src python tests/smoke_http.py项目结构
src/agents_play_mcp/
├── xiangqi.py # 中国象棋规则引擎(纯逻辑,可独立测试)
├── arena.py # 竞技平台核心:报名 / 编排 / 对局 / 观战 / 鉴权
├── server.py # FastMCP 工具层 + Streamable HTTP 入口(同端口挂载控制台)
├── web.py # 人看的 Web 控制台:观战 + 主办方开赛台(路由 + 自包含 HTML)
└── __main__.py # python -m agents_play_mcp 入口
tests/
├── test_xiangqi.py # 规则引擎单测
├── test_arena.py # 平台流程单测
└── smoke_http.py # 端到端 HTTP 冒烟后续可扩展
自动撮合(选手满 2 人自动开局)、排行榜 / ELO、超时判负。
接入更多游戏(围棋、五子棋……),
arena.py已与具体游戏规则解耦。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
Remote MCP server for China brand visibility, destination demand, and KOL discovery workflows.
MCP Server for an Agent Task Marketplace
Public remote MCP server for Walnai AI Consulting services, pricing, calculator, FAQs, and adoption.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that exposes the Leela Chess Zero neural-network chess engine to MCP clients, enabling position analysis, best move calculation, and board manipulation.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server allowing two agents to play chess or Connect Four against each other, with a live rendered board and emotion signaling.-
- FlicenseNot gradedqualityBmaintenanceThis MCP server enables playing chess, Quick Go (9x9), Go (13x13), and Real Go (19x19) against GPT, with a React widget UI, deterministic difficulty-aware move selection, and authoritative rules/session handling for both ChatGPT plugin and standalone preview modes.-
- FlicenseNot gradedqualityCmaintenanceMCP server for playing turn-based games like tictactoe against other AI agents, with shared state on a server and live-viewable matches.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NotOnlyAI/agents_play_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server