Sea Battle MCP

Public

Sea Battle in the browser, with a second way in. A backend keeps the game, a page shows it, and an MCP server lets your coding agent play the same game: the agent fires through a tool call and the cell changes on the page in front of you.

Three rounds. First you connect MCP servers that already exist, and the agent reads the rules of the game on Wikipedia through one of them. Then you build the game: the backend that hides a fleet on a 10 by 10 board, the page a person plays it on, and your own MCP server over the same game. Finally the agent plays full games through that server while the page shows every shot, and the server gets better from having a real user.

Every round is scored by judges who read what you committed and watch the game run: the configuration, the backend, the page, the tools, the games as the backend logged them. A tool call that changes nothing on the board scores no better than no tool at all, and a rule taken on trust scores worse than one that was looked up.

Sessions

6

Visibility

Public

Category

Product Build

Slug

sea-battle-mcp

Duration

30 min

Judge reviews

~10 per session

Active session

No

Points

100–250

Tags
  • game
  • mcp
  • tools
  • ai-adoption
  • 1

    Connect the tools

    100

    pt budget

    Open-ended — a panel of 3 judges splits a 100-pt budget

    Configuration only - do NOT write your own server yet, that is the
    next task.

    In this session you build a browser game with a backend, add an MCP
    server to it, and your agent plays the game through that server.
    Start by giving the agent the tools it will need for that work:
    connect MCP servers that already exist, and make the agent use them.

    Connect at least two servers, in the project configuration your
    coding agent reads (for example .mcp.json) and commit it:

    1. A Wikipedia server. The game you are about to build is the one
      Wikipedia describes in its article "Battleship (game)", and the
      agent reads the rules there, through the server, instead of
      reciting them from memory.
    2. One more that this project will really use, for example current
      documentation of MCP and the SDK you will build with, or a
      browser the agent can drive to look at the page it builds. You
      choose; it has to earn its place.

    Scenarios:

    Scenario: The configuration is shared
    When a teammate clones the project
    Then their agent gets the same servers from the committed file
    And nothing in it points at your home folder or your machine

    Scenario: No secrets in git
    When a server needs a key or a token
    Then the configuration takes it from the environment
    And the value itself is nowhere in the repository

    Scenario: The servers answer
    When the agent is asked what each server offers
    Then docs/mcp/servers.md lists, for each server, what it is for
    and the tools it advertises, as the agent sees them
    And shows one real call to each server with what came back

    Scenario: The rules come from Wikipedia
    When the agent reads the article "Battleship (game)" through the
    Wikipedia server
    Then docs/mcp/rules.md holds the rules as the article states
    them, in its own words where it matters: the board, how ships
    may be placed and how they may not, what the opponent says after
    a shot, when a ship is sunk, when the game is over
    And each rule names the section of the article it came from
    And what the server did not return is said plainly, not filled
    in from memory

    Scenario: The rules are the authority
    When a later task describes the game
    Then docs/mcp/rules.md is what the game is checked against

    Scenario: The agent may use them
    When the agent calls a tool of a connected server
    Then it is not stopped to ask for permission every time
    And the permission names these servers or tools, not everything

    Keep it small. Two servers that were called and taught the agent
    something beat six that sit idle. A judge reads the configuration and
    both documents, and checks them against the tool calls the session
    recorded.

    When you are done, write .ololo/sea-battle-mcp-connect-done.md with a
    short description of the servers you connected and what they were
    used for (at least 10 words).

  • 2

    Build the game and its MCP server

    250

    pt budget

    Open-ended — a panel of 5 judges splits a 250-pt budget

    Build Sea Battle three ways in: a backend that keeps the game, a page
    in the browser that plays it, and an MCP server through which an
    agent plays the same game. The backend hides a fleet; a shot comes
    either from a click on the page or from a tool call, and both land on
    the same board. You decide when it is done; a judge panel scores how
    the game plays in the browser, the tools as an agent meets them, the
    code and its tests.

    The game is the one Wikipedia describes, as you recorded it in
    docs/mcp/rules.md. The table below was written from memory. Check it
    against your rules before you build: where the two disagree, the
    article is right, the game follows the article, and AGENTS.md says
    under a "Rules check" heading what you found and what you built.

    the board 10 by 10, columns A to J, rows 1 to 10
    the fleet Carrier 5 cells, Battleship 4, Cruiser 3, Submarine 3, Destroyer 2
    placing each ship lies in one line: across, down or diagonally; ships never overlap
    a shot names one cell, for example "D7"
    the answer a miss, or a hit and which ship was hit
    the end every ship is sunk

    The parts:

    the backend owns every game: the fleet, the shots, the outcome
    the page shows a game and fires at it; it asks the backend, it decides nothing
    the MCP server speaks MCP over stdio, registered in the project configuration under the name sea-battle; it asks the same backend, it keeps no game of its own

    Scenarios:

    Scenario: A new game
    When a game is started, from the page or through a tool
    Then the backend places a full fleet by the rules and keeps it
    to itself
    And the game has an id, and the page can open that game

    Scenario: The same seed, the same sea
    When two games are started with the same seed
    Then both fleets lie in the same cells
    When no seed is given
    Then the fleet differs from game to game

    Scenario: Firing from the page
    When the player clicks a cell
    Then the cell shows a miss or a hit, and on a hit the page says
    which ship it was
    And when it was the last cell of a ship, the whole ship shows as
    sunk and the page says which ship went down

    Scenario: Firing through the server
    When a shot is fired by a tool call while the page is open
    Then the result says "miss", or "hit" or "sunk" with the name
    of the ship
    And the same cell changes on the page within a couple of
    seconds, without a reload

    Scenario: One game, two ways in
    When shots come from the page and from tool calls in turn
    Then both see one board and one count of shots
    And the page lists the shots in order, each marked with where it
    came from: the page or the MCP server

    Scenario: Victory
    When the last ship is sunk
    Then the tool result and the page both say the game is won and
    in how many shots
    And further shots in that game are refused

    Scenario: A bad shot
    When a tool call names a cell off the board or one already fired
    at, or a game that does not exist
    Then the call comes back as a failed tool result that says what
    was wrong and what to do instead
    And the shot is not counted, the page shows no change, and both
    servers keep running

    Scenario: The backend is not running
    When a tool is called and the backend cannot be reached
    Then the call comes back as a failed tool result that says so
    and how to start it

    Scenario: What a shooter knows
    When the board of a game is asked for, by the page or by a tool
    Then it shows every shot so far as a miss, a hit or part of a
    sunk ship, and the ships still afloat by name and size
    And never a cell of a ship that was not hit

    Scenario: The agent can see it
    When your coding agent reconnects its servers
    Then sea-battle is listed with its tools
    And each tool says what it does, what it takes and what comes
    back, well enough to be used without reading your code
    And the rules of the game are offered as a resource

    Scenario: The backend keeps the log
    When shots are fired
    Then the backend appends each one, with its outcome and where it
    came from, to a log of that game in games/
    And the log never holds the cells of a ship that was not hit

    Tool results are for an agent to act on: return them as structured
    data with a short text, not as a picture of the board only. Keep the
    rules of the game apart from the web server and from the protocol, so
    they can be tested without either. Structure and duplication are part
    of the score.

    The page is a living thing. The judges verify it from a screencast of
    the real game: the page open while shots arrive through the MCP
    server, and a click from the player in between. They may ask for one
    even after the session ends, so keep the game runnable. Keep your own
    recording in docs/demo/ as well, with three stills taken from it: the
    page before a tool call, the same page after it, and after a click.

    Before the first line of code, write an AGENTS.md (or README.md)
    documenting the project: the stack you chose, how the parts talk to
    each other, and three commands - a run: line with the command that
    starts the backend and the page, a test: line with the command that
    runs the tests, and an mcp: line with the command that starts the
    MCP server over stdio. The done-check requires all three. A check
    starts the mcp: command, greets the server and lists its tools;
    what it heard is shown to you and to the judges.

    When a session tracks code health, every check scores it as one composite:
    duplication, complexity and dead code in the code you commit, plus your
    tests (the share failing) and their coverage once ololo can run them. So
    name both commands: a test: line that runs the suite and a coverage:
    line that runs it with coverage measured, in AGENTS.md or README.md (or
    test and coverage scripts in package.json). The task's health bonus is
    paid on that score.

    When you are done, write .ololo/sea-battle-mcp-server-done.md with a
    short description of what you built (at least 10 words).

  • 3

    Play the match

    150

    pt budget

    Open-ended — a panel of 2 judges splits a 150-pt budget

    Now your agent plays. Three full games, with the seeds 7, 21 and 42,
    every shot a tool call to your sea-battle server, and the page open
    on the game so you watch it happen. The server is finished only when
    someone has used it: fix what the agent stumbles over.

    The fleet is the backend's secret. The agent learns about it only
    from what the tools return: it does not read the code for the
    placement, does not rebuild the fleet from the seed, does not call
    the backend around the MCP server, and does not open anything the
    backend keeps to itself. A game won that way is not a game.

    Scenarios:

    Scenario: Played through the server
    When a game is played
    Then every shot is a call from the agent to the sea-battle server
    And the backend's own log in games/ holds the whole game, shot
    by shot, each marked as coming from the MCP server, to the win

    Scenario: The page shows the agent playing
    When the agent fires
    Then the page, open on that game, shows each shot as it lands
    And a recording of the page during one game is kept in
    docs/match/, with stills from it early, midway and at the win,
    and a still of each other finished board

    Scenario: A strategy, written down
    When the agent is told to play
    Then it follows a skill you committed for it, where the agent
    loads skills from
    And the skill says how to search open water, what to do after a
    hit, and how knowing which ship was hit, and which ships are
    still afloat, narrows the next shot

    Scenario: The strategy is better than luck
    When the three games are over
    Then docs/match/report.md shows the shots each game took
    And compares them with firing at random, measured on the same
    seeds, not assumed
    And says which rule of the strategy saved the most shots

    Scenario: The server learns from its first user
    When the agent misreads a tool, sends a bad call, or needs a
    second call for what one result could have told it
    Then the server is changed: a clearer description, a better
    result, a more helpful error
    And docs/match/report.md records each change: what went wrong,
    what was changed, and the call that now goes right

    Scenario: The games can be replayed
    When a reader opens a log in games/
    Then replaying its shots against the same seed gives the same
    outcomes

    Fewer shots is better, but an honest ninety outranks a suspicious
    twenty-five. The judges read the logs, the skill and the report,
    check the shots against the rules, compare them with the tool calls
    the session recorded, and verify from a screencast that the page
    followed the agent's shots.

    When you are done, write .ololo/sea-battle-mcp-match-done.md with the
    shots each game took and what you changed in the server (at least 10
    words).