mcpField
P
PlayerOS

PlayerOS

Remote
github.com/movaMedia-IncDeveloper Tools0Updated 21w ago
Repository

About PlayerOS

PlayerOS SDK is a TypeScript/JavaScript SDK and CLI for the PlayerOS API, a platform for casino operators. It covers player data, campaigns, compliance, privacy, and webhooks, and PlayerOS also provides an MCP server for AI agents.

Key features

  1. 01Manage player records
  2. 02Send email and SMS campaigns
  3. 03Check compliance and record consent
  4. 04Export or delete privacy data
  5. 05Manage webhooks and API keys
  6. 06CLI with JSON output

Use cases

  1. 01Find or update player profiles
  2. 02Run campaigns with idempotency keys
  3. 03Handle consent records and privacy requests
  4. 04Pipe API results from the CLI into other commands

MCP support

PlayerOS provides an MCP server at `https://api.playeros.ai/api/mcp`, with 25 tools and discoverable resources for AI agents.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://api.playeros.ai/api/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

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.

Tools

25
ParameterTypeRequiredDescription
limitintegerNoMax rows (default 25, max 200).
statusstringNoExact status filter, e.g. 'active'.
email_containsstringNoCase-insensitive email substring.
orderstringNoOrder clause, e.g. 'created_at.desc'.

Details

From the project README

PlayerOS SDK

Official TypeScript/JavaScript SDK and CLI for the PlayerOS API — the casino marketing platform for gaming operators (unified player database, multi-channel campaigns, journey automation, and TCPA/CCPA/GDPR compliance).

Zero runtime dependencies. Node 18+ (uses built-in fetch).

Install

npm install @playeros/sdk

Authenticate

Create a property-scoped API key (pk_…) in Settings → API & MCP (https://playeros.ai/dashboard/mcp). Keys carry read and/or write scopes and are bound to one property. Send it as X-Api-Key (the SDK does this for you).

Quickstart

import { PlayerOS } from "@playeros/sdk";

const playeros = new PlayerOS({ apiKey: process.env.PLAYEROS_API_KEY! });

// List players
const { data: players, totalCount } = await playeros.players.list({ limit: 50, q: "gold" });

// Create a player (gaming-native fields)
await playeros.players.create({ email: "[email protected]", tier: "Gold", adt: 250, coin_in: 18000 });

// Send a campaign — pass an idempotencyKey so retries never double-send
await playeros.campaigns.sendEmail(
  { campaignId: "…", propertyId: "…" },
  { idempotencyKey: crypto.randomUUID() }
);

Resources

GroupMethods
playerslist, get, create, update, delete, validateBatch
validationJobsget (poll an async batch job)
campaignssendEmail, sendSms (both accept { idempotencyKey })
compliancecheck, recordConsent
privacyexportData, deleteData (CCPA / GDPR)
webhookslist, create
apiKeyscreate, list, revoke (admin; needs a dashboard JWT)

Every call returns { data, status, requestId, totalCount?, rateLimit, idempotencyReplayed? }.

Errors

Non-2xx responses throw PlayerOSError with a stable .code you can branch on:

import { PlayerOSError } from "@playeros/sdk";

try {
  await playeros.players.create({ /* … */ });
} catch (e) {
  if (e instanceof PlayerOSError) {
    if (e.code === "insufficient_scope") { /* use a write-scoped key */ }
    if (e.status === 429) await sleep((e.retryAfter ?? 1) * 1000); // then retry
    console.error(e.status, e.code, e.requestId);
  }
}

Honor the rateLimit (X-RateLimit-*) hints and back off on 429.

CLI

The package ships a playeros command:

export PLAYEROS_API_KEY=pk_live_…

playeros players list --limit 25
playeros players get <id>
playeros players create --data '{"email":"[email protected]","tier":"Gold"}'
playeros campaigns send <campaignId> --property <propertyId> --idempotency-key $(uuidgen)
playeros compliance check --data '{"propertyId":"…","playerId":"…","channel":"sms"}'
playeros --help

Output is JSON on stdout — pipe to jq. Run one-off without installing: npx @playeros/sdk --help.

For AI agents

See AGENTS.md. PlayerOS also exposes a Model Context Protocol server at https://api.playeros.ai/api/mcp with 25 tools and discoverable resources.

License

MIT © PlayerOS

Comments

Markdown supported

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.