reversi-mcp-apps

reversi-mcp-apps

An MCP server that provides a Reversi game where the AI cannot cheat because game rules are handled server-side.

Category
访问服务器

README

Simple Reversi for MCP Apps

English / Japanese

Migrate from https://github.com/mfukushim/reversi-mcp-ui.

Reversi was available on Goose MCP client

This is a simple Reversi game that uses MCP Apps. You can control your turn (fixed to black) by clicking on the screen.

However, its greatest feature is that "the rules of Reversi are decided by the MCP, making it difficult for the AI to cheat the rules of the game."

Because Reversi is simple, AI rarely cheats the game rules, but it's known that AI often cheats when playing more complex games.

In this MCP server, the game rules are handled by the MCP, making it difficult for AI to cheat (Note: There are currently some limitations).

The structure is relatively simple, so we believe it can be used as a reference for creating similar board games.

<img width="400" alt="image" src="./blog_media/img.png" />

Available MCP clients

Currently, we have confirmed that it works with Claude Desktop for Windows.
Since it complies with the MCP Apps specifications, it is likely to work with clients that support MCP Apps.

reversi works with Goose MCP client. It also works experimentally with Avatar-Shell

Note: This MCP server outputs HTML data using the ui:// schema for each screen and each move. When you first start using it, please check for unexpected token consumption.

Get started

Public Server

Reversi MCP Apps is built on the MCPAgent mechanism of CloudFlare AI Agent and supports Streamable-http connections.

A demo using Cloudflare workers is available below.

Please configure the following MCP settings on each MCP client.

  • Claude Desktop(oauth required MCP client)
{
  "mcpServers": {
    "reversi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://reversi-mcp-apps.daisycodes.workers.dev/mcp"
      ]
    }
  }
}
  • MCP clients that do not require OAuth (Goose, Avatar-Shell, etc.)
{
  "mcpServers": {
    "reversi": {
      "type": "streamable-http",
      "url": "https://reversi-mcp-apps.daisycodes.workers.dev/mcp"
    }
  }
}

After successfully connecting Reversi, you can start playing by clicking "Play Reversi".
Depending on the AI's performance, you may also need to instruct the user to "It is your turn to play white pieces and place them in the best position."

(The public server may be shut down in the future.)

Local Server

You can run it as a local server by running wrangler locally.

pnpm run dev # run wrangler local

or 

npm run dev # run wrangler local

Please configure the following MCP settings on each MCP client.

  • Claude Desktop(oauth required MCP client)
{
  "mcpServers": {
    "reversi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/mcp"
      ]
    }
  }
}
  • MCP clients that do not require OAuth (Goose, Avatar-Shell, etc.)
{
  "mcpServers": {
    "reversi": {
      "type": "streamable-http",
      "url": "http://localhost:8787/mcp"
    }
  }
}

Note: Starting wrangler seems to result in an error within a Docker container.

Tool Functions and UI Actions

tool functions

  • new-game
    Displays the initial game screen. If the game is in progress, the initial screen will be displayed.
  • get-board
    Get the Reversi board. When you first run it, the initial game screen will be displayed.
  • select-user
    Places the black stone (user turn). Coordinates are specified from A1 to H8. If there is no choice but to pass the turn, call it with PASS. To end/reset the game, call it with NEW. In environments where UI Actions are implemented, you can play the game without using them. In that case, if you configure the MCP client so that the select-user tool function cannot be called, the AI will not be able to control the user turn.
  • select-assistant
    Place the white stone (AI turn). The coordinates are A1-H8. If you have no choice but to pass your turn, call it with PASS.
  • restore-game
    Restoring a suspended game (currently being adjusted)

Resource

  • ui://reversi-mcp-ui/game-board
    Board html+js (Vue rendering)

Program Structure

Reversi rules are processed within the MCP server. This means that the AI cannot directly intervene in the execution of the rules. This prevents the AI from cheating according to the rules, which is a common occurrence with AI.

Note
In the current specifications, strictly speaking, AI may interfere with the rules in the following cases:

  • The AI may call the tool (select-user) on the user's turn without permission.
  • The AI may be able to read the user's moves during their turn (this is not an issue in Reversi, but it is necessary to take measures in games where you hide your moves or cards).

MCP handling

This client configuration is mostly compliant with @modelcontextprotocol/ext-apps.
It has been extended to work with Cloudflare MCPAgent.

Local Debugging and Deployment

This mostly follows the instructions for running and debugging Cloudflare MCPAgent.

pnpm install # install

pnpm run cf-typegen # generate cloudflare types

pnpm run dev # start dev server

pnpm run inspector # start inspector

pnpm run deploy # deploy to cloudflare workers

Guide

https://note.com/marble_walkers/n/n79768bd08077 (Japanese)

https://medium.com/@cubeletmoon/reversi-mcp-apps-rewriting-reversi-mcp-ui-for-mcp-apps-4a28ede5685b (Translated)

推荐服务器

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

官方
精选