Skip to content

Multiplayer for web games: The Gang's All Here!

Lobbies, parties, chat, leaderboards and webhooks, without writing a server. Paste a few lines, get multiplayer.

Start free

Ping(you → relay)

100ms

SDK
~20KB GZ
FREE TIER
—
SETUP
5 MIN

Multiplayer Simplified.

  • Lobbies

    Quick match, room codes or a server browser. The host can kick, lock and name the room.

    relay.quickMatch()
  • Parties

    Invite codes. Friends queue together and land in the same room.

    relay.createParty()
  • Netcode

    Declare what moves and who owns it. The SDK syncs and smooths it, and a new host carries on if one drops.

    room.define()
  • Chat

    Room chat with names and avatars. Short, safe, rate limited.

    room.chat('gg')
  • Leaderboards

    High score boards for every game. Submit a score, show the top ten.

    leaderboard.submit()
  • Saves

    Key-value storage per player. Progress that sticks.

    storage.set()
  • Webhooks

    Signed events to your backend when players join, score and chat.

    POST → your backend
  • Moderation

    Kick players or close rooms from the dashboard, MCP or your backend, with event logs for every game.

    kick · close · logs
  • Persistence

    Rooms are snapshotted and players reconnect to the same seat.

    on('player_reconnected')
Built for AI coding agents

Let your AI wire it up.

The whole integration guide lives in one plain-text file written for LLMs. Point your agent at it, or connect the MCP server so it can pull the guide and a starter game on its own. Sign it in to your account and it can create instances, change settings, read logs, moderate rooms and wire up webhooks too.

Add online multiplayer to my game with GameRelay. Read https://gamerelay.io/llms.txt first and follow it.

MCP server

docs · or your account

Manage your account too (opens your browser to approve, once):

Other clients (Cursor, Windsurf, Claude Desktop):

{
  "mcpServers": {
    "gamerelay": {
      "type": "http",
      "url": "https://gamerelay.io/mcp"
    },
    "gamerelay-account": {
      "type": "http",
      "url": "https://gamerelay.io/mcp/admin"
    }
  }
}

SendRelayReceive.

LIVE TRAFFIC →CCU 5 · ROOMS 3 · 184 MSG/S · 1.2 MB/S OUTWEBHOOKS 0042 · 200 OK38msplayer_1san francisco12msplayer_2chicago96msplayer_3london31msplayer_4new york142msplayer_5são pauloapi.yourgame.comPOST /hooks200room.closeddiscord botPOST /gamerelay200chat.messagestats.yourgame.comPOST /ingest200score.submittedRELAYmkc1K7QM4/4H4KQ2/2ZP2X3/8kansas city · rooms + saveswebsocketwebhook (signed POST)you → roomroom → you
  1. LVL 1

    Make an account

    Free. Spin up an instance for each game you ship.

  2. LVL 2

    Grab your key

    Add one script tag and paste your public key into your game.

  3. LVL 3

    Go multiplayer

    Join a room and declare what moves. We handle syncing, host changes, reconnects and saves.

Example code: GAME.JS
const relay = await GameRelay.connect({
  publicKey: "gr_pub_8f2k…",
});
const room = await relay.quickMatch();

const ships = room.define("ship", { x: "number", y: "number" });
const me = ships.spawn({ x, y });
me.x += 5; // synced and smoothed for everyone
relay.storage.set("highscore", score);
PLAYER 2 HAS ENTERED

Ship multiplayer tonight.

Create free account
Select your plan

Priced like a coffee.

Limits are per account, across all your games. Every plan gets every core feature. GameRelay is in alpha, so prices and limits may change before launch.

Loading…