# Multiplayer Agent > Make any game multiplayer with one key, no engineering, no code. Multiplayer Agent is a hosted multiplayer backend for browser games. You add one script tag and a publishable key to an HTML or JavaScript game and it becomes real-time multiplayer, no server to write, deploy or scale. It can also be driven directly by an AI coding agent over the Model Context Protocol, so a game can be built without leaving the editor. ## What it does - Real-time rooms with shared state; rooms are created on first join. - Ownership by construction: a client can only write its own player's fields. - Server-authoritative game logic for rules a client must not be able to fake, with versioning, rollback and error logs. - Player identity (anonymous-first, optional username login) and saved progress. - Leaderboards, scoped per game or across a studio. - Player-created content with browsing, voting and moderation. - Monetization through Stripe, plus bring-your-own ads id. - First-party analytics: sessions, retention, concurrency, client errors. ## What it is not suited to - Competitive twitch games (fast shooters, racing). The transport is reliable rather than UDP, and there is no client prediction or rollback. - Native Unity or Unreal projects. The client SDK targets the browser. - Hidden-information games by default: room state replicates to everyone in the room unless the secret is held in server-side logic. ## Pricing Billed by monthly active players, not by concurrent connections. Concurrency spikes cost nothing extra and an idle game costs nothing. Limits are measured rather than enforced: exceeding one raises an alert, it does not drop players. - Free: free: up to 1,000 monthly active players, 3 games, 30 concurrent players per game, 10 GB traffic - Indie: $15/month or $150/year: up to 25,000 monthly active players, 12 games, 200 concurrent players per game, 100 GB traffic - Pro: $59/month or $590/year: up to 75,000 monthly active players, 25 games, 800 concurrent players per game, 300 GB traffic - Studio: $199/month or $1,990/year: up to 250,000 monthly active players, 100 games, 2,000 concurrent players per game, 1,000 GB traffic Full details: https://multiplayeragent.com/pricing ## Documentation - [Documentation](https://multiplayeragent.com/docs): the SDK reference, arranged by topic. - [Full SDK reference](https://multiplayeragent.com/docs/full): the entire reference on one page. - [Plain-text corpus](https://multiplayeragent.com/llms-full.txt): everything on this site as text. - [FAQ](https://multiplayeragent.com/faq): limits, cost, and what to reach for when. ## Guides and comparisons - [Looking for a Photon alternative?](https://multiplayeragent.com/compare/photon-alternative): How Multiplayer Agent compares to Photon for browser and .io games: billed by monthly players instead of concurrent connections, with no server code to write. - [Looking for a Playroom alternative?](https://multiplayeragent.com/compare/playroom-alternative): How Multiplayer Agent compares to Playroom: the same monthly-players pricing model, plus authoritative server logic, leaderboards, saves and an agent-native build path. - [How to choose a multiplayer backend for a browser game](https://multiplayeragent.com/compare/best-multiplayer-backend-for-browser-games): A practical guide to picking a multiplayer backend for a browser or .io game: what to compare, which pricing meter fits which game, and when to pick something else. - [Looking for a Nakama alternative?](https://multiplayeragent.com/compare/nakama-alternative): How Multiplayer Agent compares to Nakama for browser games: no server to run or write modules for, billed by monthly players, and a much smaller job to get playable. - [How to sync player positions between browsers](https://multiplayeragent.com/guides/sync-player-positions-between-browsers): Send your own position on a fixed tick, draw everyone else by moving toward their last known position, and movement looks smooth on an ordinary connection. - [How to add a leaderboard to a JavaScript game](https://multiplayeragent.com/guides/add-a-leaderboard-to-a-js-game): Add a persistent leaderboard to a browser game: submit a score, read the top of the board and the player's own rank, and make the scores trustworthy. - [How to add multiplayer to a browser game](https://multiplayeragent.com/guides/add-multiplayer-to-a-browser-game): Add real-time multiplayer to an existing HTML or JavaScript game with one script tag: sync player positions, share room state, and handle joins and leaves. - [How to make an .io game](https://multiplayeragent.com/guides/how-to-make-an-io-game): What an .io game actually needs: a shared arena, many players in one room, fair rules and a leaderboard, and the shortest path to a playable one in the browser. - [Make a multiplayer game with Claude Code](https://multiplayeragent.com/guides/multiplayer-game-with-claude-code): Connect Multiplayer Agent to Claude Code or any MCP-capable agent, then describe the game you want. The agent defines the room, writes the client and deploys server rules. ## Getting started 1. Sign up at https://multiplayeragent.com/login: the free tier needs no card. 2. Copy the publishable key from the dashboard. 3. Add the script tag and call MP.join with the key and a room name. ## Connecting an AI agent (Model Context Protocol) This platform exposes a tool server, so an agent can create the game, define the room, write the client and deploy server-side rules without a human reading an API reference first. It is a deterministic API, not a language model. Endpoint: https://api.multiplayeragent.com/mcp (streamable HTTP) Auth: Authorization: Bearer , starting sk_ The secret key is per studio and is shown at https://multiplayeragent.com/dashboard/key after signup. It is NOT the publishable key that ships inside a game, and must not be pasted into client code or shared in chat. Config for an MCP client (for example .mcp.json in Claude Code): { "mcpServers": { "multiplayer-agent": { "type": "http", "url": "https://api.multiplayeragent.com/mcp", "headers": { "Authorization": "Bearer sk_your_secret_key" } } } } Tools include: create_game, list_games, set_game_name, define_room_type, get_connection_info, get_client_snippet, get_sdk_reference, deploy_room_logic, rollback_room_logic, list_room_logic, get_room_logs, set_player_scope. Setup page: https://multiplayeragent.com/mcp Walkthrough: https://multiplayeragent.com/guides/multiplayer-game-with-claude-code