About Player Two
Player Two provides an SDK, starter, examples, and documentation for browser game developers building on its game platform. Its remote MCP server also lets AI agents find games and manage game submissions and studio content.
Key features
- 01JavaScript SDK with TypeScript types
- 02Game starter and Three.js example
- 03Trophies, scores, and multiplayer rooms
- 04Game submission and studio management tools
Use cases
- 01Build a browser game with Player Two services
- 02Let an agent submit and update a game
- 03Consult SDK documentation through an agent
MCP support
The remote MCP server at https://playertwo.lol/api/mcp exposes public tools for searching games and reading SDK guidance, plus studio tools for submitting games, uploading builds, editing pages, and managing game content. Studio changes require an agent key or user sign-in.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://playertwo.lol/api/mcpclaude mcp add --transport http lol-playertwo https://playertwo.lol/api/mcp{"mcpServers":{"lol-playertwo":{"type":"http","url":"https://playertwo.lol/api/mcp"}}}Open in Cursor{"servers":{"lol-playertwo":{"type":"http","url":"https://playertwo.lol/api/mcp"}}}Open in VS Code{"mcpServers":{"lol-playertwo":{"type":"http","url":"https://playertwo.lol/api/mcp"}}}{"mcpServers":{"lol-playertwo":{"serverUrl":"https://playertwo.lol/api/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://playertwo.lol/api/mcpAuth requiredTools
Details
From the project READMEPlayer Two SDK
The open parts of Player Two for game developers and AI agents: the game SDK
(playertwo-sdk), the starter
(create-playertwo-game), examples, and docs in Markdown.
Player Two is a game store and a launchpad. Games are sold (or free) to play in the browser or download, and raises
let players back a game while it is being made, paid to its developer stage by stage as they post proof. A web game
hosted on Player Two plays at its own address on playertwo.cc and gets, through one account per player: trophies, XP
and levels, stats, leaderboards, cloud saves, presence, invites, add-ons, in-game purchases (you keep 80%), the
player's avatar, travel between games, and multiplayer rooms with no server of your own, including server-side room
code, voice chat, worlds and replays.
This repository holds the SDK, the starter and their docs. The Player Two platform itself is not open source.
Quick start
npm create playertwo-game@latest my-game
cd my-game
npm install
npm run dev # open it in two tabs: each tab is a player
Or add the SDK to your own game:
<script src="https://playertwo.lol/sdk/v1.js"></script>
<script>
PlayerTwo.init()
.then(async (p2) => {
await p2.trophies.unlock("first-win");
await p2.scores.submit("time-attack", 83400);
const room = await p2.rooms.join({ mode: "arena", size: 16 });
room.on("message:emote", (kind, from) => console.log(from, kind));
room.send("emote", "wave");
})
.catch((e) => { /* not on Player Two (e.code "not-on-player-two"): play on without services */ });
</script>
npm install playertwo-sdk
import { init } from "playertwo-sdk";
const p2 = await init();
Put it on Player Two: submit the game at https://playertwo.lol/submit, make an agent key in your studio (Agents), then
curl -fsSLO https://playertwo.lol/cli/p2.mjs
P2_AGENT_KEY=p2_agent_... node p2.mjs push dist --game your-game
What's here
| Path | What it is |
|---|---|
packages/sdk | playertwo-sdk on npm: init() for bundled code, TypeScript types for the page (index.d.ts) and for a room's server code (playertwo-sdk/room, room.d.ts) |
packages/create-playertwo-game | npm create playertwo-game@latest my-game |
starters/threejs | Press Start, the multiplayer Three.js + Vite starter it makes |
examples/trophies-and-leaderboard | One HTML file: a trophy and a leaderboard with the script tag |
examples/multiplayer-room | A room with room.sync, messages, shared state and a server-side room.js |
docs/ | getting started, every SDK call, rooms, in-game purchases, hosting, the CLI, agents and MCP, fees |
For AI agents: the MCP server
Player Two runs a remote MCP server (Streamable HTTP) at https://playertwo.lol/api/mcp. With it an agent submits its
player's games, uploads their media and web builds, edits their pages, and manages trophies, leaderboards, products,
builds, posts and rooms.
claude mcp add --transport http player-two https://playertwo.lol/api/mcp
No key is needed for the public tools (get_submission_guide, check_game, search_games, list_games,
get_game_facts, get_sdk_docs, where_to_publish). For the tools that change a game, add the player's agent key,
made in their studio on playertwo.lol under Agents:
claude mcp add --transport http player-two https://playertwo.lol/api/mcp --header "Authorization: Bearer p2_agent_..."
Or no key at all: clients that sign in (Claude's and ChatGPT's connectors, Claude Code, Cursor) ask the player to sign in to Player Two and allow them the first time a studio tool is called (OAuth 2.1 with PKCE).
MCP Registry name: lol.playertwo/mcp (server.json); server card at
https://playertwo.lol/.well-known/mcp.json. The same things over plain HTTP: the agent
API (GET https://playertwo.lol/api/v1/agent/guide, POST https://playertwo.lol/api/v1/agent/games), with its
OpenAPI 3.1 spec at https://playertwo.lol/openapi.json. Details: docs/agents-and-mcp.md.
Links
- Player Two: https://playertwo.lol
- Docs: https://playertwo.lol/docs (the SDK: https://playertwo.lol/docs/sdk, hosting: https://playertwo.lol/docs/hosting)
- For language models: https://playertwo.lol/llms.txt, and this repository's
llms.txt - Everything a game gets, on one page: https://playertwo.lol/developers
- Contact: [email protected]
Issues
Issues and pull requests about the SDK, its types, the starter, the examples and these docs are welcome. Questions about your account, payments or a game on Player Two: https://playertwo.lol/help.
License
MIT, see LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.