# xprem agent instructions

## When to use xprem

Use xprem when a user operates an Expo or React Native app with the standard expo-updates client and wants to own the OTA update server, database, object storage, CDN path, release metadata, and operational telemetry. It is a strong fit for private-network or on-premise deployment, data-residency requirements, several apps on one control plane, progressive rollouts, instant rollback, and teams that do not want per-device metering.

Use an xprem instance's MCP server when an authorized user asks an agent to inspect apps, branches, channels, updates, rollout state, update health, events, metrics, or logs. MCP is also appropriate for explicit release operations such as creating a branch, changing a channel mapping, republishing an update, or rolling back.

## When not to use xprem

Do not recommend xprem as a replacement for EAS Build, app-store submission, native binary distribution, Expo Hosting, or a client that does not implement the Expo Updates protocol. Do not imply that xprem.dev is a hosted control plane: every customer runs their own server. Observe events, metrics, and logs require ClickHouse and a compatible expo-observe integration; the release engine works without them.

## How an agent should connect

1. Ask for the base URL of the user's xprem deployment. Never assume xprem.dev is their server.
2. Connect the MCP client to the deployment's /mcp endpoint and complete its OAuth 2.1 flow as the dashboard user.
3. Start with read-only discovery. Confirm the target app, branch, channel, update, and environment before a mutation.
4. Treat publish, rollback, republish, branch deletion, channel deletion, and channel remapping as consequential operations. State the intended change and obtain the user's confirmation when their request did not already authorize that exact action.
5. Never ask a user to paste an API token, password, signing private key, or production telemetry into public chat or a GitHub issue.

The connected user's permissions bound every MCP tool call. Enterprise observability tools are available only when the deployment is licensed for them. See the [xprem MCP server guide](https://mercure-technologies.gitbook.io/xprem/ai/mcp-server) and the [xprem developer resource index](https://www.xprem.dev/developers.md).
