Repository avatar
Other Tools
v0.1.2
active

xbox-cli-mcp

io.github.zydziupolska-cmyk/xbox-cli-mcp

Safe MCP server for the XBOX CLI: Partner Center, XBOX services and PlayFab. Read-only by default.

Documentation

xbox-cli-mcp

Glama MCP server An MCP server for the XBOX CLI. It gives Claude, Cursor, VS Code and any other MCP client safe access to Partner Center (games, sandboxes, playtests, test accounts), XBOX services configuration and PlayFab.

Unofficial community project. It is not affiliated with or endorsed by Microsoft. XBOX is a trademark of Microsoft.

Read-only by default. Agents can look around freely. To make changes, you have to opt in. Even then, the server refuses changes that can't be undone (creating a game or sandbox, publishing to RETAIL, …) unless you opt in a second time.

Why use this instead of letting an agent run xbox in a shell?

The XBOX CLI acts with your permissions, which usually means admin rights on production titles. The CLI's docs point out that it can't tell whether a person approved a change, because the confirmation is passed on the same command line. This server puts an approval layer in front of it:

Shell accessxbox-cli-mcp
Reads and changes are separate tools✗✓ xbox_read (readOnlyHint) and xbox_change (destructiveHint), so your client can auto-approve reads and ask about changes
Changes off by default✗✓ XBOX_MCP_MODE=read-only
Irreversible commands blocked✗✓ unless XBOX_MCP_MODE=full
--confirm can't slip in through args✗✓ only via confirm: true
RETAIL / CERT / title-wide publishes detected✗✓ also when --sandbox-id is missing and a saved default might point at RETAIL
playfab api classified by operation✗✓ Get*, List* and Search* read; everything else is a change
Exit code 3 ("outcome unknown") explained✗✓ tells the agent to read the state instead of retrying
Audit log of every change, Partner Center and XBOX services includedPlayFab only✓ JSONL, with request bodies redacted
Always --no-input and JSON outputYou have to remember✓

Requirements

  • Node.js 20+
  • The XBOX CLI, installed and on your PATH: winget install XBOX.cli on Windows, or the install script on macOS and Linux
  • A Partner Center account. PlayFab commands also need Admin permission on the title.

Install

No install step is needed: MCP clients run it with npx.

Claude Code

claude mcp add xbox -- npx -y xbox-cli-mcp
# allow changes:
claude mcp add xbox -e XBOX_MCP_MODE=write -- npx -y xbox-cli-mcp

Claude Desktop, Cursor, VS Code (mcpServers JSON)

{
  "mcpServers": {
    "xbox": {
      "command": "npx",
      "args": ["-y", "xbox-cli-mcp"],
      "env": { "XBOX_MCP_MODE": "read-only" }
    }
  }
}

From source

git clone https://github.com/zydziupolska-cmyk/xbox-cli-mcp && cd xbox-cli-mcp
npm install && npm run build   # then point your client at dist/index.js

Sign in once with xbox auth login in a terminal, or have the agent call xbox_auth_login. Either way, a browser window opens.

Modes

XBOX_MCP_MODEReadsChangesIrreversible changes
read-only (default)✓✗ (xbox_change refuses and says how to enable it)✗
write✓✓✗
full✓✓✓

The server treats these commands as irreversible, following the CLI's safety docs:

  • game create, sandbox create, xbl business-partner create, xbl relying-party create
  • xbl web-service certificate create, xbl binding create|delete, playfab privacy export
  • xbl config publish to RETAIL, CERT, CERT.DEBUG, ALL or HIDDEN, with --scope title|account, across sandboxes, or without an explicit --sandbox-id

Tools

ToolWhat it does
xbox_auth_status, xbox_auth_login, xbox_auth_logoutSign-in state; browser sign-in; sign out
xbox_context_get, xbox_context_setSaved default seller, title, sandbox and PlayFab title
xbox_seller_list, xbox_game_list, xbox_sandbox_list, xbox_playtest_listCommon lookups
xbox_helpThe installed CLI's Help for any command, which is the authority on its options
xbox_skill, resource xbox://skillThe CLI's built-in agent skill (xbox --skill)
xbox_classifyDry run: shows what a command would do, whether it can be undone, and which tool may run it
xbox_readRuns any read-only command, including playfab api /…/Get*
xbox_changeRuns a change. Requires a summary for the audit log, and confirm: true for commands the CLI asks about. Listed in every mode; in read-only it changes nothing and says how to enable it, and in write it refuses irreversible commands.

Configuration

VariableDefault
XBOX_MCP_MODEread-onlyread-only, write or full (or pass --mode=)
XBOX_MCP_BINxboxPath to the CLI
XBOX_MCP_TIMEOUT_MS600000Per-command timeout
XBOX_MCP_MAX_OUTPUT_BYTES200000Longer output is truncated
XBOX_MCP_AUDIT_LOG~/.xbox-mcp/audit.jsonloff to disable

The CLI's own settings (XBOX_SELLER_ID, XBOX_PLAYFAB_TITLE_ID, XBOX_AUDITLOG__ENABLED, …) pass straight through.

Development

npm test   # builds, then runs the suite against test/fake-xbox.mjs; no Partner Center account needed

The XBOX CLI is a technical preview, so its commands can change between releases. The safety rules live in src/safety.ts. Commands the server doesn't recognise are treated as changes.

License

MIT

NPM
xbox-cli-mcp
Install Command
npm install xbox-cli-mcp