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

# Shadow AI

> Discover, monitor, and control shadow AI clients, MCP servers, skills, and plugins across your organization

## The Shadow AI Problem

When employees install AI clients, configure MCP servers, or add AI skills directly — Cursor, Claude Code, Claude Desktop, VS Code, Codex, and others — these tools and integrations run outside centralized observability and control. The result is a **shadow IT problem for AI tooling**: ungoverned access to your code, data, and systems, with no audit trail.

Runlayer addresses shadow AI through the **AI Watch** agent: one signed package, three features. Deploy the package once through your MDM, then use configuration to decide which optional features run.

<CardGroup cols={2}>
  <Card title="Deploy AI Watch" icon="download" href="/shadow-ai/deploy">
    Install one package, then configure Detect, Enforce, and Sessions
  </Card>

  <Card title="Detect" icon="eye" href="/shadow-ai/detect">
    Always on — discover AI clients, shadow MCP servers, skills, and plugins via scheduled scans
  </Card>

  <Card title="Enforce" icon="plug" href="/shadow-ai/enforce">
    `Enforcement` flag — block unmanaged MCP sources and policy-check local tool activity
  </Card>

  <Card title="Sessions" icon="chart-line" href="/platform-sessions">
    `Sessions` flag — collect lifecycle telemetry for prompts, tool calls, and responses
  </Card>

  <Card title="User and Identity Mapping" icon="user" href="/shadow-ai/identity-mapping">
    Map device usernames to Runlayer users for discoveries, sessions, and audit
  </Card>
</CardGroup>

***

## Security Risks

### Shadow MCP Servers

Shadow MCP servers pose significant security risks:

* **Data exfiltration** — Risky MCP servers can steal source code, credentials, API keys, and customer data
* **Supply chain attacks** — Compromised or trojanized MCP packages can inject risky behavior into otherwise legitimate tools
* **Prompt injection** — Shadow MCPs may contain tool poisoning attacks that manipulate AI behavior
* **Lateral movement** — MCPs with broad permissions can be exploited to access internal systems
* **Compliance violations** — Uncontrolled access to PII, PHI, or regulated data without audit trails

### Shadow Skills

Skills are instruction files that extend AI coding assistants with specialized knowledge, workflows, and tool integrations — such as SKILL.md files. When these are installed outside organizational control, they become **shadow skills**.

Shadow skills introduce distinct risks:

* **Prompt injection** — Skill instructions can manipulate AI behavior, override safety guidelines, or inject malicious prompts
* **Unauthorized automation** — Skills can define workflows that automate actions beyond what an organization has approved
* **Supply chain risk** — Unvetted community skills may contain instructions that exfiltrate data or introduce vulnerabilities

### Shadow AI Clients

AI clients are inventory artifacts in their own right. Detect reports supported clients such as Cursor and Claude Code even when they have no MCP servers, skills, or plugins configured, giving security teams visibility into unapproved AI software across their device fleet.

New client discoveries start as **Shadow**. Administrators can mark approved clients as **Managed** from the Shadow Overview. Client presence has a **Low** baseline risk because presence alone does not expose the behavior of an integration; use the detected version, device, user, and installation evidence when reviewing it.

### Why This Matters for Security Teams

Unlike traditional shadow IT, shadow AI is particularly dangerous because:

1. **AI amplifies access** — A single MCP or skill can give AI assistants broad access to databases, APIs, and file systems
2. **Actions are automated** — MCPs enable AI to take actions autonomously, not just read data
3. **No audit trail** — Shadow MCPs and skills operate outside your logging and monitoring infrastructure
4. **Difficult to detect** — MCP configurations and skill files are stored in user-space config files, not installed as traditional software

***

## One Package, Three Features

Detect is always enabled after AI Watch is installed. Enforce and Sessions are controlled by package configuration, and one organization API key authenticates scanning, enforcement, and sessions; no enrollment keys are required.

| Feature      | Configuration                         | What it does                                                                                |
| ------------ | ------------------------------------- | ------------------------------------------------------------------------------------------- |
| **Detect**   | Always on                             | Discovers AI clients, shadow MCP servers, skills, and plugins through scheduled scans       |
| **Enforce**  | `Enforcement` / `AIWATCH_ENFORCEMENT` | Installs client hooks that block unmanaged MCP sources and policy-check local tool activity |
| **Sessions** | `Sessions` / `AIWATCH_SESSIONS`       | Installs the full event hook set for [Sessions](/platform-sessions) telemetry               |

* **Enforce** is disabled by default. Set `Enforcement=true` (macOS) or `AIWATCH_ENFORCEMENT=1` (Windows) to block unmanaged MCP sources and policy-check local tool activity.
* **Sessions** is enabled by default. Set `Sessions=false` (macOS) or `AIWATCH_SESSIONS=0` (Windows) to skip the full event/session hook set.

Hook installation follows the combined capability state: AI Watch installs hook configs when either Enforce or Sessions is enabled. Detect-only requires explicitly setting `Sessions=false` or `AIWATCH_SESSIONS=0`; omitting `Sessions` uses the default enabled state and installs hooks for monitoring-only telemetry.

**Advanced scan tuning (optional).** Detect scans walk each user's home directory to a bounded depth within a per-scan time budget, and a cooperative in-process governor keeps CPU and memory use within soft caps. The defaults fit most fleets — override them only if scans miss deeply-nested project configs (raise depth), run out of time on very large home directories (raise timeout), or you want to constrain the scan's footprint on constrained hosts (lower the CPU / memory caps).

| Setting               | Configuration                                | Default                | Range             |
| --------------------- | -------------------------------------------- | ---------------------- | ----------------- |
| **Project depth**     | `ProjectDepth` / `AIWATCH_PROJECT_DEPTH`     | `7`                    | `1`–`20`          |
| **Project timeout**   | `ProjectTimeout` / `AIWATCH_PROJECT_TIMEOUT` | `60`s                  | `1`–`300`s        |
| **CPU cores**         | `CpuCores` / `AIWATCH_CPU_CORES`             | half the logical cores | `1`–logical cores |
| **Max CPU percent**   | `MaxCpuPercent` / `AIWATCH_MAX_CPU_PERCENT`  | `50`                   | `5`–`100`         |
| **Memory limit (MB)** | `MemoryLimitMb` / `AIWATCH_MEMORY_LIMIT_MB`  | `1024`                 | `128`–`8192`      |

All are integers — macOS `<integer>` in the tenant-config profile, Windows `REG_DWORD` via the matching MSI `AIWATCH_*` property. Omit the keys to keep the defaults. Values outside the range are clamped into it; non-integer or non-positive values are ignored and the default applies. The CPU / memory caps are best-effort: the governor throttles the scan to hold the CPU duty cycle (`max(0.05, min(cpu_cores, MaxCpuPercent% × logical_cores))` cores) and aborts the scan if its Python-heap high-water mark exceeds the memory ceiling.

<Warning>
  Deploying the default package is not scan-only: if Sessions is left unset, AI Watch installs monitoring hooks for supported local clients. For Detect-only rollout with no hooks, explicitly disable Sessions (`Sessions=false` on macOS or `AIWATCH_SESSIONS=0` on Windows). See the [Intune Detect-only example](/shadow-ai/deploy/intune#phase-1--create-the-app).
</Warning>

Start with [Deploy AI Watch](/shadow-ai/deploy) to install the package and choose Enforce / Sessions configuration. Detect scans run by default after deployment.

***

## The Shadow Dashboard

The **Shadow** page in the sidebar brings every discovery into one view:

* **Overview** — per-device Client, MCP, Skill, and Plugin rows with type filters, a managed vs. shadow breakdown, and a **Shadow vs Managed** trend over time
* **Connectors** — most common shadow servers, users running them, top servers to migrate, and which MCP clients are in use
* **Skills** — shadow skill discoveries over time, most common skills, users with shadow skills, and a per-client breakdown
* **Devices** — AI Watch device fleet status: Detect, Enforce, and Sessions health, OS versions, and tool versions across enrolled devices

### The Devices tab

Open the **Shadow** page and select the **Devices** tab to answer per-device fleet questions during and after rollout:

* **Which devices are enforcing vs. monitoring-only** — each row shows a status badge for **Detect**, **Enforce**, and **Sessions** (`Active`, `Inactive`, `Disabled`, `Error`, `Drifted`, or `Device Unresponsive`). A monitoring-only device shows Enforce as `Disabled` while Detect (and optionally Sessions) report `Active`. Hover an `Error` or `Drifted` badge to see the underlying error message and when it occurred.
* **Which Runlayer version each device runs** — the **Tool version** column shows the installed AI Watch agent version per device, alongside **OS**, **OS version**, and a **Last seen** check-in timestamp. Use this to track upgrade progress across the fleet.
* **Filtering** — narrow the table by Detect, Enforce, or Sessions status, device, user, OS, or OS version; columns are sortable.

***

## Related Resources

<CardGroup cols={2}>
  <Card title="Re-analyzing Classifications" icon="refresh" href="/shadow-ai/re-analyzing">
    Refresh server and skill classifications after changes
  </Card>

  <Card title="Responding to Discoveries" icon="shield" href="/shadow-ai/responding-to-discoveries">
    Security team response framework
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/shadow-ai/troubleshooting">
    Common issues and solutions
  </Card>

  <Card title="FAQ" icon="circle-question" href="/shadow-ai/faq">
    Pre-deployment, security-review, and operational questions
  </Card>

  <Card title="Remove AI Watch" icon="trash" href="/shadow-ai/deploy/remove">
    Remove package-based and legacy script-based deployments
  </Card>
</CardGroup>
