Skip to main content
Glama
Xbox AI Controller MCP Server

Xbox AI Controller MCP Server

by SherrySoft

🎮 Xbox AI Controller

License: MIT Node.js Model Context Protocol Platform

Control your Xbox One & Xbox Series console directly from AI Agents (Antigravity, Claude, Cursor) or CLI using natural language.

Launch games (FC 25, Minecraft, Halo, etc.), send controller button presses, manage media playback, adjust TV volume via HDMI-CEC, and power on/off over Wi-Fi and official Microsoft Cloud APIs.


⚡ Architecture: The Dual-Layer Engine

xbox-ai-controller combines two complementary communication protocols to give your AI agent complete command over your console:

flowchart TD
    Agent["🤖 AI Agent (Antigravity / Claude / Cursor)"] --> MCP["⚡ Xbox AI Controller MCP Server"]
    CLI["💻 CLI Terminal (`npx xbox-ai`)"] --> MCP

    subgraph Dual_Engine ["Dual-Layer Control Engine"]
        MCP -->|Local UDP 5050| SG["📡 Local SmartGlass Engine"]
        MCP -->|HTTPS OAuth| XCCS["☁️ Microsoft XCCS Cloud API"]
    end

    SG -->|Magic Wake Packets| XboxPower["Power On (Remote Wake)"]
    SG -->|Gamepad Inputs| XboxInput["Buttons (A, B, X, Y, Guide, D-Pad)"]
    SG -->|Media & TV Remote| XboxMedia["Play, Pause, TV Volume (HDMI-CEC)"]

    XCCS -->|Official UWA Protocol| XboxLaunch["1-Click Game & App Launcher"]
    XCCS -->|Title Hub| XboxTitles["Enumerate Installed Games"]
    XCCS -->|Power Commands| XboxOff["Standby / Cloud Power-Off"]

    XboxPower --> Console["🎮 Xbox One / Xbox Series X|S"]
    XboxInput --> Console
    XboxMedia --> Console
    XboxLaunch --> Console
    XboxTitles --> Console
    XboxOff --> Console
  1. Local SmartGlass Engine (UDP Port 5050):

    • Direct, zero-latency local network communication.

    • Remote Wake-up magic packets (0xdd02).

    • Controller button presses (A, B, X, Y, D-Pad, Nexus / Guide Menu, Menu, View).

    • Media playback control (Play, Pause, Stop, Next, Previous, Rewind, Fast-Forward).

    • TV / soundbar volume control via console HDMI-CEC (Volume Up, Volume Down, Mute).

  2. Microsoft Console Command Service (XCCS Cloud):

    • Official Microsoft UWA protocol (xccs.xboxlive.com).

    • 1-Click Game Launching: Bypasses manual on-screen navigation to boot any game or app directly by name (e.g., "Open FC 25", "Launch Minecraft", "Open YouTube").

    • Safe 2FA Authentication: Uses Microsoft's official device-code flow (microsoft.com/link) — no passwords needed.


Related MCP server: samsung-tv-mcp

✨ Features

  • 🎯 1-Click Game Launcher: Launch installed titles (EA Sports FC 25, Minecraft, Cricket 24, Halo Infinite, Asphalt Legends, War Thunder, Netflix, Spotify, etc.) by name.

  • ⚡ Zero-Lag Gamepad Navigation: Navigate menus and dashboards using virtual controller inputs.

  • 📺 Media & TV Volume Remote: Play/pause streaming apps and adjust TV volume through HDMI-CEC.

  • 🔌 Power Management: Wake the console from Sleep mode or put it into standby remotely.

  • 🔐 2FA-Friendly Device-Code Auth: Authenticate using official microsoft.com/link codes without exposing your password in chat.

  • 🤖 Universal MCP Support: Plugs into Google Deepmind's Antigravity CLI (agy), Claude Desktop, Cursor, Windsurf, or custom LLM frameworks.

  • 💻 Standalone CLI Included: Every feature can be run directly from terminal (npx xbox-ai) without an AI agent.


🚀 Quickstart

1. Installation

Clone and install dependencies:

git clone https://github.com/SherrySoft/xbox-ai-controller.git
cd xbox-ai-controller
npm install

2. Configure Your Xbox Console (One-Time)

On your Xbox One or Xbox Series console:

  1. Enable Sleep Mode:

    • Go to Settings > General > Power options and select Sleep (Instant-On).

  2. Enable Remote Features:

    • Go to Settings > Devices & connections > Remote features and check Enable remote features.

    • Under Xbox app preferences, select Allow connections from any device.

3. Discover Your Console

Run the discovery tool on the same Wi-Fi/LAN:

node bin/cli.js discover

It will detect your Xbox's IP address, name, and Live Device ID, and save them automatically to ~/.xbox-mcp/config.json.

4. Authenticate for 1-Click Game Launching

To allow your AI agent to launch games directly without manual on-screen navigation:

node bin/cli.js login
  1. Open the URL displayed on your screen: 👉 https://www.microsoft.com/link

  2. Enter the short code displayed in the terminal.

  3. Approve with your Xbox account. Tokens are securely stored locally on your machine.


🤖 AI Agent Integration (MCP Setup)

No need to manually find or edit JSON files! Simply run:

npx github:SherrySoft/xbox-ai-controller install

(Or npx xbox-ai-controller install if installed via npm)

The interactive installer will ask:

  1. Which AI Agent you want to configure (Antigravity, Claude Desktop, Cursor, Windsurf, or All).

  2. Which runner you prefer (npx zero-install or local path).

It detects your operating system, locates your config file, and safely injects the MCP server entry automatically!


Manual Configuration (Optional)

If you prefer to configure manually, add the following to your agent's config file:

Antigravity CLI (agy) — ~/.gemini/config/mcp_config.json

{
  "mcpServers": {
    "xbox": {
      "command": "npx",
      "args": ["-y", "xbox-ai-controller"]
    }
  }
}

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "xbox": {
      "command": "npx",
      "args": ["-y", "xbox-ai-controller"]
    }
  }
}

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "xbox": {
      "command": "npx",
      "args": ["-y", "xbox-ai-controller"]
    }
  }
}

(Note: You can also replace "npx", ["-y", "xbox-ai-controller"] with "node", ["/path/to/xbox-ai-controller/src/server.js"] if running from a local clone).


---

## 💬 Natural Language Prompts

Once configured, simply talk to your AI agent naturally:

- *"Turn on my Xbox"*
- *"Launch EA Sports FC 25"*
- *"Open Minecraft"*
- *"Open YouTube"*
- *"Go back to the Home screen"*
- *"Press the Xbox Guide button"*
- *"Press Down and select A"*
- *"Pause the video"*
- *"Turn the TV volume up"*
- *"Record that game clip"*
- *"Put my Xbox to sleep"*

---

## 🛠️ CLI Usage Guide

You can also use the controller directly from your terminal:

```bash
# Scan local network for consoles
node bin/cli.js discover

# Power on / wake
node bin/cli.js wake

# Launch games & apps
node bin/cli.js launch "FC 25"
node bin/cli.js launch "Minecraft"
node bin/cli.js launch "YouTube"
node bin/cli.js launch "Home"

# List installed games on console
node bin/cli.js apps

# Controller button navigation
node bin/cli.js button nexus    # Open Guide menu
node bin/cli.js button a        # Select (A)
node bin/cli.js button b        # Back (B)
node bin/cli.js button down     # D-Pad Down

# Media & Volume
node bin/cli.js media playpause
node bin/cli.js volume up
node bin/cli.js volume down

# Power off
node bin/cli.js off

🎮 Available MCP Tools

Tool

Parameters

Description

xbox_discover

timeout_seconds

Scans local subnet for active/standby Xbox consoles.

xbox_power_on

ip, live_device_id

Sends SmartGlass wake packet burst (0xdd02).

xbox_power_off

ip

Puts the console into standby/sleep mode.

xbox_ping

ip

Checks if console is active and listening on port 5050.

xbox_launch

target (required)

1-Click game/app launch (FC 25, Minecraft, etc.) or go Home.

xbox_installed_apps

none

Fetches the full list of installed games from console.

xbox_button

button (required)

Sends button press (a, b, x, y, nexus, menu, view, dpad).

xbox_media

command (required)

Controls media playback (play, pause, stop, next, prev).

xbox_volume

command (required)

Adjusts TV volume via HDMI-CEC (volume_up, volume_down, mute).

xbox_record_dvr

ip

Triggers the "Record that!" command to save last 30s game clip.

xbox_auth_device_code

none

Starts 2FA-safe Microsoft Device-Code authentication flow.

xbox_get_config

none

Inspects current saved configuration and connection state.

xbox_set_config

ip, live_device_id, etc.

Updates settings manually.


🔒 Security & Privacy

  • No Passwords Stored: Authentication uses official Microsoft OAuth Device-Code flow. Passwords are never handled or logged.

  • Local Storage: All tokens, configuration, and IP addresses remain strictly on your local PC in ~/.xbox-mcp/ and are excluded in .gitignore.

  • First-Party Microsoft APIs: Cloud commands communicate exclusively with https://xccs.xboxlive.com using standard TLS encryption.


📄 License

This project is licensed under the MIT License.

Available Tools

13 tools
xbox_auth_device_codeA

Initiates a safe Microsoft Device-Code login (bypassing 2FA). Gives a verification URL (microsoft.com/link) and a short code.

Inputs: no named parameters.

xbox_buttonA

Sends controller buttons to the console: 'a', 'b', 'x', 'y', 'up', 'down', 'left', 'right', 'nexus' (Guide button), 'view' (Back), 'menu' (Start).

Inputs: button (required), ip.

xbox_discoverA

Scans the local network (UDP 5050) for Xbox One or Xbox Series consoles, automatically retrieving and saving IP address, console name, and Live Device ID.

Inputs: auto_save_first, timeout_seconds.

xbox_get_configA

Inspects the saved configuration, console details, and authentication status.

Inputs: no named parameters.

xbox_installed_appsB

Fetches the full list of installed games and applications from the console.

Inputs: no named parameters.

xbox_launchA

1-Click launches any game or application (e.g. FC 25, Minecraft, YouTube, Netflix, Spotify) or returns to the Home screen.

Inputs: target (required), ip.

xbox_mediaB

Controls media playback on the console: 'play', 'pause', 'playpause', 'stop', 'next_track', 'prev_track', 'fast_forward', 'rewind'.

Inputs: command (required), ip.

xbox_pingA

Pings an Xbox console on port 5050 to check if it is online, awake, and actively responding on the network.

Inputs: ip.

xbox_power_offA

Powers OFF an Xbox console or puts it into Standby/Sleep mode.

Inputs: ip.

xbox_power_onA

Powers ON an Xbox console from standby/sleep mode over local Wi-Fi/LAN using the SmartGlass wake packet protocol.

Inputs: ip, tries, live_device_id.

xbox_record_dvrB

Triggers the 'Record that!' command to save the last 30 to 60 seconds of gameplay.

Inputs: ip.

xbox_set_configC

Updates console IP, Live Device ID, name, or authentication tokens manually.

Inputs: ip, name, user_hash, xsts_token, +1 more.

xbox_volumeA

Adjusts TV or soundbar volume via the console's HDMI-CEC: 'volume_up', 'volume_down', or 'mute'.

Inputs: command (required), ip.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools target a distinct action (power, launch, buttons, media, DVR, auth), but xbox_discover, xbox_ping, and xbox_get_config all partially answer 'is the console reachable/configured?', and xbox_media vs xbox_button could be confused by an agent unsure whether a 'play/pause' belongs to media or a button press. These overlaps are resolvable from the descriptions but not perfectly crisp.

    Naming Consistency4/5

    All names share a consistent xbox_ prefix and snake_case, which is strong. However, styles are mixed: some are verb-based (xbox_power_on, xbox_launch, xbox_get_config) while others are bare nouns or command categories (xbox_button, xbox_media, xbox_volume, xbox_installed_apps), which slightly weakens predictability.

    Tool Count5/5

    Thirteen tools is a well-scoped set for a console-control server: discovery, power, launch, input, media, volume, DVR, auth, and config each earn their place without redundancy or bloat.

    Completeness4/5

    The surface covers the core console lifecycle: discover, power on/off, ping, launch apps, list apps, buttons, media, volume, DVR capture, auth, and config get/set. Gaps remain for common interactions such as text/keyboard input (e.g. searching in an app), listing or managing captured DVR clips, and app uninstall/management.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to control a set-top streaming device and visually navigate its interface, including opening apps, managing playback, entering text, adjusting volume and power, sending remote input, and capturing screenshots for observation and verification.
      14
      42 PyPI
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to control a Samsung Tizen smart TV on the local network directly over its local APIs, with no cloud account or hub required. Agents can check power and volume status, switch the TV on or off, send remote keys, type text, launch apps, and play YouTube videos, all under configurable volume and key-press guardrails.
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI agent to control an LG webOS TV by reading playback status, listing and launching apps, adjusting volume or mute, and powering it off.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Gives AI coding agents eyes and hands on a TV: capture the screen as an image, press remote keys, type text, read console logs and JS errors, deploy projects, launch apps, and apply or revert system tweaks across Android TV, Google TV, Fire TV, Roku and LG webOS. This lets an agent design, live-check and iterate on a custom ad-free home screen directly on the big screen.
      2
      MIT