
mcp
lol.playertwo/mcp
Find browser games on Player Two, read its game SDK docs, and run your game studio there.
Documentation
Player 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: hello@playertwo.lol
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.
No installation packages available.