Develop

Using Meta XR Operator with Meta Quest

Updated: Sep 10, 2026
Experimental feature
Meta XR Operator is an experimental component of the Meta XR Core SDK. Tool names, APIs, and behavior may change in future releases. Avoid depending on it in production apps.
You can run Meta XR Operator on a Meta Quest headset, not just in the Editor or Simulator. The OpenXR API layer runs inside your app on the device, and its MCP server listens on port 8720 inside the app’s process. To reach it from your computer, you forward that port over ADB and let the MCP proxy on your host connect to it.

Before you begin

Build and deploy from Unity

  1. In Unity, open File > Build Profiles and switch the active platform to Android (Meta Quest).
  2. Open Edit > Project Settings > Meta XR and use the Project Setup Tool to fix any outstanding Meta XR Operator issues for the Android platform.
  3. In Build Profiles, enable Development Build so the on-device MCP server and tools are available.
  4. Connect your Quest, then build and run your project on the device as you would for any Quest build.
When Meta XR Operator is activated for your project, the build bundles the OpenXR API layer into your Android app automatically, so there’s no separate layer to install on the device.
Unity Build Profiles set to the Android platform

Set up the headset from the AI Tools panel

If you set up Meta XR Operator through the Unity AI Tools panel, run the on-device setup from the XR Operator card instead of entering the adb commands by hand. With your Quest connected and the app installed, click Set up headset. A live checklist runs these commands in order:
  • adb forward tcp:8720 tcp:8720 — forwards the on-device MCP server port to your computer.
  • adb shell setprop debug.oculus.experimentalEnabled 1 — enables the full tool set on Horizon OS v205+.
  • adb shell setprop debug.meta_xr_operator.request_capture_permission 1 — shows the screen-capture consent dialog at app start.
  • adb shell am broadcast -a com.oculus.vrpowermanager.prox_close — keeps the headset awake while it’s off your face.
Click Undo setup to reverse all four. These device settings don’t survive a reboot, so click Set up headset again after the headset restarts.
The XR Operator card's Set up headset and Undo setup buttons with the device setup checklist
With your app running on the headset and setup complete, the MCP proxy on your host connects to the on-device server and your agent receives the app’s tools automatically. Ask your agent about the running app just as you would on desktop. The proxy is the same one you registered in Getting started, so there’s nothing new to register for Quest.

Optional: Manual setup

Follow these steps by hand if you aren’t using the Unity AI Tools panel — for example, if you use the standalone Meta XR Operator distribution with your own OpenXR app — or if you prefer to script the setup. None of the debug. properties or port forwards survive a reboot, so re-run them after the headset restarts.

Add the internet permission

The on-device MCP server needs network access, so your app must request the INTERNET permission. In Unity, set Player Settings > Other Settings > Internet Access to Require, or add the permission to your Android manifest:
<uses-permission android:name="android.permission.INTERNET" />

Enable experimental features

On Horizon OS v205 or later, Meta XR Operator needs experimental features to expose its full set of tools. Declare the feature in your Android manifest:
<uses-feature android:name="com.oculus.experimental.enabled" android:required="false" />
Then, with your app installed, turn the feature on at runtime:
adb shell setprop debug.oculus.experimentalEnabled 1

Forward the port and connect

On the headset, the bundled API layer runs the MCP server on port 8720 inside your app’s process. Forward that port to your computer so the MCP proxy can reach the on-device server:
adb forward tcp:8720 tcp:8720
Your computer can bind host port 8720 only once. If you also ran your app in the Unity Editor or Meta XR Simulator, that session already holds host port 8720, and adb forward tcp:8720 tcp:8720 fails with “address already in use.” Close the Editor or Simulator session first, or forward to a different host port and point the forward there, for example adb forward tcp:8721 tcp:8720.
To manage forwarding:
adb forward --list             # list forwarded ports
adb forward --remove tcp:8720  # stop forwarding port 8720

Test with the headset off your face

By default the proximity sensor sleeps the headset the moment it leaves your face, which pauses the OpenXR runtime and makes tools unresponsive while the device sits on a desk. To keep the device active as if worn:
adb shell am broadcast -a com.oculus.vrpowermanager.prox_close
To hand control back to the physical sensor:
adb shell am broadcast -a com.oculus.vrpowermanager.automation_disable

Front-load the screen capture permission

The screen capture tool uses Android MediaProjection, which needs a one-time in-headset consent. By default the dialog appears on the first capture call, and the tool returns a retryable “permission pending” message until you approve it. To show the dialog at app start instead, set this property before launching the app:
adb shell setprop debug.meta_xr_operator.request_capture_permission 1

Platform notes

  • The app must be running and focused on the headset for live tools to return data.
  • Reading session, tracking, and frame state and setting controller input and poses work on Quest. The one exception is head-pose override (openxr_set_head_pose): on a headset the head pose follows the physical device, so the agent can’t override it.
  • Image capture requires a one-time in-headset permission. You can front-load this consent at app start, as described above.