Guide

Make a multiplayer game with Cursor

Updated 2026-11-23

Short answer: open your web game's folder in Cursor, and give Cursor's agent Joinable's prompt. The agent reads getjoinable.com/AGENTS.md, picks the pattern for your genre, adds an async script tag and a few hooks, and runs npx getjoinable test to play a round in two real browsers. No server code, and no account or key while the game runs on localhost. To give Cursor Joinable's tools too, add the MCP server in .cursor/mcp.json.

1. Give the agent the prompt

Open the game's folder as the workspace, open the chat in Agent mode (the mode that edits files and runs commands), and paste:

Make this web game multiplayer using Joinable. Read
https://getjoinable.com/AGENTS.md first and follow it exactly: it says how
to pick the right pattern for this game's genre, what to change, and how to test
with two browser tabs. Start with the smallest change that works (usually one
script tag), test it with two tabs, and only go further if the doc's checks fail
for this game. Don't write any server code: Joinable's hosted relay does all of
that. No key is needed on localhost. If the doc's self-test applies (full rounds),
run it with `npx getjoinable test <the game's local URL>` until it passes. When
you're done, tell me which pattern you used, what you changed, and anything that
doesn't sync.

The agent has to read the kit from the web. If it doesn't, add the MCP server below, which hands it the kit as a tool, or save https://getjoinable.com/AGENTS.md into the project and point the agent at the file. It also needs to run terminal commands for the self-test; approve them when asked. The game has to be served locally (npm run dev, npx serve, or the project's own command) for the test to open it.

2. Optional: add Joinable's MCP server

In .cursor/mcp.json at the project root:

{
  "mcpServers": {
    "joinable": { "command": "npx", "args": ["-y", "getjoinable", "mcp"] }
  }
}

That runs the server on your machine, with the self-test. Prefer nothing to install? Connect the remote server instead (everything except the self-test, which has to open your game locally):

{
  "mcpServers": {
    "joinable": { "url": "https://getjoinable.com/mcp" }
  }
}

Put the same config in ~/.cursor/mcp.json to have it in every project. The tools: joinable_kit, joinable_choose_pattern, joinable_snippet, joinable_get_started, joinable_desyncs, and locally joinable_selftest. The package is getjoinable, one word: never npx joinable, which belongs to someone else.

3. What Cursor's agent changes

Ask it which pattern it chose; the prompt tells it to say.

The diff should be small. If you see a new server.js, Socket.IO or a lobby screen, the agent skipped the kit: reject it and ask again. Solo play must still work when Joinable doesn't load: the tag is async and every call is guarded with window.Joinable?..

4. Test it

For full rounds, the agent runs this in Cursor's terminal:

npx getjoinable test http://localhost:5173/

Two headless browsers join one room by invite link, and the test checks one seed on both, each player seeing the other, one result and a rematch. Add --players 4 (up to 8 on localhost), or --channel chrome for heavy 3D games. If Chromium for Playwright isn't installed: npx playwright-core install chromium.

Then play a round yourself in two browser windows side by side: Play online, invite, open the link in the other window, Ready in both. Then a phone and a laptop on different networks. For shared worlds, the two-window check is the test: same world in both, actions show up in both, and closing the host window leaves the other playing.

5. Go live

  1. Get a free key at getjoinable.com/app and add your game.
  2. Add the address players will use to the game's sites.
  3. Have the agent add data-key="pk_…" to the script tag. Public keys aren't secrets.

Sandbox is free: on a live site, 100 player-hours a month in rooms of 4. Starter is $9.99 a month for 3,000 player-hours and rooms of 8. Pricing.

Troubleshooting

Where it stops working

Web games only: native desktop, console and mobile app builds aren't supported. No fighting games (rollback) or competitive shooters (trusted server) yet. Shared worlds run on one player's device and players report their own scores, so it's for friends and casual leaderboards, not prize play. See the general guide.

FAQ

Can Cursor make my game multiplayer?

Yes, if it's a web game. Give Cursor's agent Joinable's prompt in the game's folder. It reads the kit, wires an async script tag and a few hooks, and runs a two-browser self-test, without writing any server code.

Where does Cursor's MCP config go?

In .cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project. Use npx -y getjoinable mcp as the command for the local server, or https://getjoinable.com/mcp as the url for the remote one.

Do I need an account to try it?

No. On localhost and other local addresses Joinable needs no key and is free, in rooms of up to 8. You need a free key when the game goes on a real site.

Will my game still work offline?

Yes. The script loads async and every call is guarded, so if Joinable doesn't load the game stays single-player and the Online button stays hidden.

Copy the prompt for your coding agent or sign up free