Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Submarine Attack Apps

БесплатноНе проверен

MCP server for playing a submarine (Battleship-style) game against an AI, with game rules enforced server-side to prevent cheating.

GitHubEmbed

Описание

MCP server for playing a submarine (Battleship-style) game against an AI, with game rules enforced server-side to prevent cheating.

README

English / Japanese

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

This is a submarine game by MCP Apps.

The game rules are similar to the grid attack in Nintendo's Wi-Fi Clubhouse Games (though 3x1 attacks are not yet included).

Game Rules
mcp/rule-logic/gameRule.ts

image image image

The rules and board control of the submarine game are handled by MCP. The user plays as player 1 and the AI plays as player 2.

Available MCP clients

Currently, operation has been confirmed with Claude Desktop for Windows.
Because it complies with the MCP Apps specifications, it is likely to work with MCP Apps-compatible clients.
Operation has also been confirmed with the following MCP clients:

Note: This MCP server outputs HTML data using the ui:// schema, one screen at a time, one move at a time. Depending on the MCP client's design, token consumption may be large.
When you first start using it, please check for unexpected token consumption.

Get started

Public Server

Submarine 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": {
    "submarine": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://submarine-attack-mcp-apps.daisycodes.workers.dev/mcp"
      ]
    }
  }
}
  • MCP clients that do not require OAuth (Goose, Avatar-Shell, etc.)
{
  "mcpServers": {
    "submarine": {
      "type": "streamable-http",
      "url": "https://submarine-attack-mcp-apps.daisycodes.workers.dev/mcp"
    }
  }
}

(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": {
    "submarine": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/mcp"
      ]
    }
  }
}
  • MCP clients that do not require OAuth (Goose, Avatar-Shell, etc.)
{
  "mcpServers": {
    "submarine": {
      "type": "streamable-http",
      "url": "http://localhost:8787/mcp"
    }
  }
}
  1. First, load the MCP resource GameRule to have the AI load the game rules. image Depending on the MCP client, the resource loading message may not appear. The AI ​​can play with general knowledge even without loading GameRule, but game progress may be unstable.
  2. Then, enter a prompt such as "Play Submarine" to start the game. The game will begin.
  3. First, arrange your pieces on the board. You can also arrange them automatically using the Random Arrange button. Once arrangement is complete, press the "Done" button.
  4. Depending on the MCP client, you may need to click a piece and press Enter to send a prompt in order for the game to proceed. When a prompt such as "press enter" appears, check the entered prompt and send it.
  5. Once you have finished placing your pieces, the AI will begin placing its pieces. Depending on the performance of the LLM, placement may not be successful in one try, so if the board state is still in player 2 placement mode, urge the AI to place by saying something like "Please place using player2-placement."
  6. Once placement is complete, you and the AI will take turns clicking on the opponent's board to attack. You may need to press Enter after clicking as the game progresses.

Tool Functions

tool functions

  • new-game
    Displays the initial game screen. If the game is in progress, it will force the initial screen.
  • get-board
    The AI retrieves the game board. It is not displayed to the user. The retrieved board is only the AI's side of the board.
    By specifying a token unknown to the AI, information about the user's side of the board can be obtained and used to update the HTML screen.
  • show-board
    The AI retrieves the game board and displays it to the user. The AI sees the AI's side of the board, and the user sees the user's side of the board.
  • player1-placement
    Player 1's piece placement. This tool is intended to be called by the board JS.
  • player2-placement
    Player 2's piece placement. This tool is intended to be called by the AI's MCP.
  • player1-attack-position
    Player 1's attack information. This tool is intended to be called by the board JS.
  • player2-attack-position
    Player 2's attack information. This tool is intended to be called by the AI's MCP.

Resource

  • file:///game-rule
    Game rules text resource (English/Japanese)
  • ui://submarine-mcp-apps/game-board
    Board html+js (Vue rendering)

Program Structure

Game 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.

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 dev # start dev server

pnpm run inspector # start inspector

pnpm run deploy # deploy to cloudflare workers

Guide (Japanese)

https://note.com/marble_walkers/n/na7e577612b27

from github.com/mfukushim/submarine-attack-mcp-apps

Установка Submarine Attack Apps

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/mfukushim/submarine-attack-mcp-apps

FAQ

Submarine Attack Apps MCP бесплатный?

Да, Submarine Attack Apps MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Submarine Attack Apps?

Нет, Submarine Attack Apps работает без API-ключей и переменных окружения.

Submarine Attack Apps — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Submarine Attack Apps в Claude Desktop, Claude Code или Cursor?

Открой Submarine Attack Apps на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Submarine Attack Apps with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai