shooting-game
Click on "Deploy 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., "@shooting-game Join my match with code 4521 and play to win!"
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.
shooting-game MCP server
Lets Claude (via Claude Desktop or Claude Code) join a real match of the shooting game as the second player and actually play it — reading the arena through a real, live browser and moving/shooting through the same inputs a human would use.
It does not re-implement any game logic. Each tool call drives a
headless (or visible) Chromium instance pointed at the real Angular app
via Playwright, reading state out of the DOM
and sending real keyboard input — the same trick used to test the
vs computer bot in this repo. That keeps it perfectly in sync with
whatever the game actually does, with nothing to duplicate or drift.
How a match works
A human opens the game and clicks "vs claude (mcp)" on the home screen. This creates a normal friendly match and shows a match code (the same underlying flow as "create match", just with different instructions on screen).
The human gives Claude that code.
Claude calls
join_matchwith the code — this is exactly the "join match by id" flow a second human player would use. Claude is always the second player to join (PLAYER_B).Claude calls
get_state,move,shoot, and optionallyscreenshotto actually play.
Related MCP server: Controlium
Setup
npm install # also downloads a Chromium build for Playwright
npm run test:smoke # optional: verifies the whole pipeline against a live gameEnvironment variables
Variable | Default | Purpose |
|
| Base URL of the Angular client to connect to. Point this at |
|
| Set to |
Register with Claude Code
claude mcp add shooting-game -- node /absolute/path/to/mcp-server/index.js(or add it to a project's .mcp.json with the same command/args.)
Register with Claude Desktop
Add an entry to claude_desktop_config.json:
{
"mcpServers": {
"shooting-game": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/index.js"],
"env": {
"GAME_CLIENT_URL": "https://shooting-game-eight.vercel.app",
"MCP_HEADLESS": "false"
}
}
}
}Hosted connector (claude.ai)
There's a second entry point, http-server.js, that serves the same tools
over the MCP Streamable HTTP transport instead of stdio — this is what lets
someone add the game as a custom connector in claude.ai (Settings →
Connectors → Add custom connector), rather than only from Claude Code/Desktop
on the machine that's running the process.
Unlike the stdio entry point, this one is multi-tenant: it hands each
connecting client its own GameSession (so unrelated users don't share a
browser/match), tracked by the standard Mcp-Session-Id session header. An
idle session (no tool calls for SESSION_IDLE_TIMEOUT_MS, default 15
minutes) has its browser closed automatically to free resources.
npm run start:http # listens on $PORT (default 3000), endpoint is POST /mcpDeploying (Render): this needs a persistent Node process with Chromium
installed, not a serverless function — build the included Dockerfile
(based on the official mcr.microsoft.com/playwright image, pinned to the
same Playwright version as package.json) as a Render Web Service. No
extra configuration is required: Render sets $PORT automatically, and the
image already sets MCP_HEADLESS=true.
Then in claude.ai: Settings → Connectors → Add custom connector → paste
https://<your-render-app>.onrender.com/mcp as the URL, no authentication.
Resource limits: because the connector has no auth, anyone with the URL can open a session, each of which holds a real Chromium process. Two knobs guard against that:
Variable | Default | Purpose |
|
| Hard cap on simultaneous browser sessions across all connected clients; |
|
| How long a session can go without a tool call before its browser is closed and the slot freed. |
Tools
Tool | Purpose |
| Join a friendly match by code (or random matchmaking if omitted). Launches the browser session. |
| Round, score, your position/health, opponent's position/health, arena size, any round/match-end announcement. |
| Hold |
| Fire in the direction you last moved. |
| PNG of the current arena, if Claude would rather look than read coordinates. |
| Disconnects and closes the browser. |
There is no separate aim. The game only supports firing in whichever of the 4 cardinal directions you last moved in — rotation and shot direction are the same thing. To land a hit, get on the same row or column as the opponent (within roughly half a player-width) and shoot while facing that way.
Notes
The stdio entry point (
index.js) holds exactly one browser session for its whole process lifetime — callleave_matchbeforejoin_match-ing again if you want a clean session. The HTTP entry point (http-server.js) gives each connected client its own session instead (see above).Because the real Node relay server has no server-side game state, hit detection happens independently in each player's own browser from the same relayed inputs. There's no separate "who's the source of truth" concern here beyond what the game already has for any two human players.
Available Tools
6 toolsget_stateGet game stateA
Read the current match state: round, score, your health and position, your opponent's health and position, arena size, and any round/match-end announcement. Positions are pixel coordinates, arena origin top-left.
Inputs: no named parameters.
join_matchJoin matchA
Join a friendly 1v1 match of the shooting game as the second player, using the match code the human shares with you. Launches a browser and connects to the live game. Omit the code to enter random matchmaking instead.
Inputs: code.
leave_matchLeave matchA
Disconnect from the current match and close the browser session.
Inputs: no named parameters.
moveMoveA
Move in one direction for a short duration. The player steps ~10px roughly every 20ms while the key is held and rotates to face that direction, which is also the direction shoot() will fire in.
Inputs: direction (required), holdMs.
screenshotScreenshot the arenaA
Get a PNG screenshot of the current arena, so you can look at the match instead of only reading coordinates.
Inputs: no named parameters.
shootShootA
Fire in whichever direction you last moved (there is no separate aim — facing is set by your last move). Holding longer fires multiple shots.
Inputs: holdMs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct action: joining, reading structured state, moving, shooting, screenshotting, and leaving. get_state and screenshot both provide observation but are clearly separated as text data vs visual image, so no real ambiguity.
join_match, get_state, and leave_match follow a clear verb_noun pattern, and move/shoot are intuitive imperative verbs. screenshot is a minor deviation because it is a noun used as an imperative rather than a verb_object form like take_screenshot.
Six tools is well-scoped for a real-time browser game agent: lifecycle, movement/action, and observation are covered without redundant utilities. Every tool earns its place.
The set covers the full match lifecycle: joining, observing via both state and screenshot, acting via move and shoot, and leaving. The shoot-direction note confirms aiming is handled through movement, so no separate aim tool is needed.
Related MCP Connectors
Build browser games on gamedev.pl from your coding agent.
Make any browser game multiplayer and host it at a share link. No account needed to start.
A real cloud browser for your AI agent. Connect Claude, ChatGPT, Cursor or any MCP client: the agent opens, reads and acts on pages with real mouse and keyboard input, in an isolated session on Browser.lol's servers. You watch live and take over at any time, for example to sign in. Sessions in other countries, an Anonymous Mail inbox for sign-up codes and saved profiles. OAuth sign-in or an API key; needs the Premium plan.
Create instant multiplayer browser-game rooms friends join from a link. No account or app needed.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to fully control a Windows desktop with native screen capture, low-level input injection, game-grade input, and play-testing capabilities.4MIT
- AlicenseNot gradedqualityDmaintenanceChrome extension + MCP bridge that gives Claude control over your real browser via CDP, enabling navigation, clicking, typing, scrolling, screenshots, and JS execution with a visible cursor and tab-bring-to-front.1MIT
- FlicenseAqualityDmaintenanceGives Claude control of a real, headed Chromium browser via Playwright, enabling web navigation, clicking, typing, screenshots, and JavaScript evaluation.8-
- AlicenseNot gradedqualityBmaintenanceLets Claude Code drive your own Chrome browser with human-like clicks, drags, and typing. It uses your real sessions and logins, and pauses for your confirmation on anything irreversible.8MIT