sea-of-fox-rts-mcp
v0.7.5Let an MCP client observe and play Sea of Fox RTS through the game server.
Let your own agent play 狐狸之海:群岛战争 using MCP tools for strategy and faction communication. The adapter runs on your machine and connects directly to a compatible Sea of Fox RTS server. For a single-player match, save and exit, authorize the Agent from the in-game save list, then use rts_rooms and rts_select_room to connect to that save. The match resumes when the MCP client connects. · DeepWiki 中文预览 · 中文接入指南 · Game project Use this one-line command in your local stdio MCP client with the server address and credential configured below.
Summary extracted from the README.
Sea of Fox RTS MCP
Let your own agent play 狐狸之海:群岛战争 using MCP tools for strategy and faction communication. The adapter runs on your machine and connects directly to a compatible Sea of Fox RTS server. For a single-player match, save and exit, authorize the Agent from the in-game save list, then use rts_rooms and rts_select_room to connect to that save. The match resumes when the MCP client connects.
· DeepWiki 中文预览 · 中文接入指南 · Game project
Use this one-line command in your local stdio MCP client with the server address and credential configured below.
npx -y sea-of-fox-rts-mcp@0.7.0
Pair and connect
- Enter a Sea of Fox RTS room with an updated game and server. For PvE or PvP, start the match in the game first.
- Open 设置 → RTS MCP → 生成凭证 and copy the server address and credential. You can rotate or revoke this credential from the same menu.
- Use Node.js 22.23.4 or later. In an MCP host that supports local stdio servers, configure the following. Put the credential in the host’s private environment configuration.
{
"mcpServers": {
"sea-of-fox-rts": {
"command": "npx",
"args": ["-y", "sea-of-fox-rts-mcp@0.7.0"],
"env": {
"SEA_OF_FOX_RTS_URL": "https://your-game-server.example",
"SEA_OF_FOX_RTS_TOKEN": "paste-your-mcp-credential"
}
}
}
}
To try a development checkout, run npm ci and use node with the absolute path to index.mjs as the host's command and argument. For a local test game, set the RTS server address to http://127.0.0.1:5192. Use HTTPS for remote servers.
If the MCP API responds with HTTP 404, check the configured server address and whether the server operator has deployed MCP support. If your credential expires or is revoked, generate a new one in the game and update SEA_OF_FOX_RTS_TOKEN.
Ask your agent to inspect the match while you're connected. Then leave the game room and ask it to run a specific objective, such as “develop the home island, secure a forward base, and win the PvP match by defeating every opposing faction.” Keep your MCP host and agent task running if you want play to continue while the browser is closed.
For an authorized single-player save, rts_observe and rts_wait query state on demand. Use rts_draw_identity to choose a card when the identity match is in its draw phase.
Tools
| Tool | What it returns or does |
|---|---|
rts_catalog |
Current faction rules, prices, unit roles and stats, training queues, resource production rates |
rts_observe |
Control status, match objectives, treasury, visible units and buildings, islands, resource reserves, recent events |
rts_build_sites |
Candidate construction sites on the builder's island, including dock locations |
rts_island_sites |
Find candidate coordinates for a new island using your faction’s visible view |
rts_order |
Up to 12 typed orders with individual acknowledgements; includes island creation, economy, construction, training, formations, naval transport, combat, and capture |
rts_wait |
Wait up to 20 seconds for control, a tick, a phase, a visible event, construction, a voyage, or a unit state |
rts_messages |
Read public broadcasts and the current faction’s private conversations, and discover recipient IDs |
rts_send_message |
Broadcast an in-game message or send to another faction while the agent holds control |
rts_diplomacy |
Read relations and incoming or outgoing formal proposals |
rts_propose_diplomacy |
Propose an alliance, declaration of war, or resource exchange |
rts_respond_diplomacy |
Accept or decline an incoming proposal, or cancel your own proposal |
Rival factions can bluff or misstate the battlefield. Cross-check claims against rts_observe and check agreements and exact trade terms in rts_diplomacy before committing resources or units.
Faction communication requires an updated RTS server. Ask your agent to check rts_messages between moves and reply in service of the game objective. Messages identify the sending player or agent. An offer of a truce takes effect through the factions’ subsequent play.
See the play guide for a practical opening and protocol notes for control and delivery semantics.
Develop
npm ci
npm test
npm pack --dry-run
To test with a checkout of the game and installed RTS server dependencies, set SEA_OF_FOX_GAME_DIR to that checkout and run npm test. The integration test starts its own local room and talks to the CLI over MCP stdio. See the release process.
Sandbox worlds have no island count cap. Read rts_catalog for islandCreation.unlimited and current production prerequisites. All factions must finish both lumber and quarry before other construction. Use rts_propose_diplomacy with kind: "duel" to invite another sandbox player, including offline players. The recipient sees the pending invitation when they return. Only acceptance starts combat; either participant can respond with decision: "end" to end the duel.
Use rts_saves to read the account cloud save directory, including offline and undelegated saves. rts_rooms is a live/delegation directory. Empty rooms or an expired seat credential do not prove a saved game was deleted. Browser-local copies are separate from cloud backups. Legacy seat credentials cannot enumerate account saves; use an account API Key.