> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getunbound.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy AI Tools via MDM

> MDM deployment scripts to install and configure AI coding tools across managed devices

## Overview

The scripts are designed to be executed on end-user devices through your MDM (Mobile Device Management) platform. They configure each AI coding tool to route through the Unbound Gateway.

<Warning>
  All scripts **must be run as root** (or with administrator privileges). When deploying through your MDM provider, ensure the execution context is set to run with root-level permissions.
</Warning>

<Note>
  Before deploying, ensure your [MDM provider is connected](/mdm-integrations/overview) or [devices are imported](https://gateway.getunbound.ai/settings?tab=devices) and you have an admin API key from [gateway.getunbound.ai/connect](https://gateway.getunbound.ai/connect).
</Note>

In every command below, replace the following placeholders with your actual values:

* **`YOUR_ADMIN_API_KEY`** — an admin API key from [gateway.getunbound.ai/connect](https://gateway.getunbound.ai/connect)
* **`https://backend.getunbound.ai`** — if your organization uses a custom backend URL, replace this with your own

***

## Cursor

Run the following command to configure Cursor:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/cursor/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY
```

***

## Claude Code

Claude Code supports two deployment methods depending on how your organization uses Anthropic.

### Method 1: Using API Key

Use this method to route all Claude Code traffic through the Unbound Gateway without requiring an Anthropic subscription on the device:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/claude-code/gateway/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY
```

### Method 2: With Anthropic Account

Use this method if the user already has an active Anthropic subscription. This configures hooks for tracking and analytics while preserving the existing Anthropic authentication:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/claude-code/hooks/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY
```

***

## Gemini CLI

Run the following command to configure Gemini CLI:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/gemini-cli/gateway/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY
```

***

## Codex

Codex supports two deployment methods depending on how your organization uses OpenAI.

### Method 1: Using API Key

Use this method to route all Codex traffic through the Unbound Gateway without requiring an OpenAI subscription on the device:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/codex/gateway/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY
```

### Method 2: With OpenAI Account

Use this method if the user already has an active OpenAI subscription. This configures hooks for tracking and analytics while preserving the existing OpenAI authentication:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/codex/hooks/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY
```

***

## Remove Unbound Configuration

To remove the Unbound Gateway configuration from a device, append `--clear` to the end of any deployment command above. This removes all Unbound-related settings for that tool and restores it to its default state.

For example:

```bash theme={null}
python3 -c "$(curl -fsSL https://getunbound.ai/setup/cursor/mdm-install)" --url https://backend.getunbound.ai --api-key YOUR_ADMIN_API_KEY --clear
```
