> ## 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 with Detect, configurable endpoint behavior, and Sessions telemetry. Deploy it once through your MDM, then change behavior through configuration.

> [card] [Deploy AI Watch](https://docs.runlayer.com/shadow-ai/deploy.md)
>
> Install one package, then configure Monitor, Protect, Enforce, and Sessions

> [card] [Detect](https://docs.runlayer.com/shadow-ai/detect.md)
>
> Always on — discover AI clients, shadow MCP servers, skills, and plugins via scheduled scans

> [card] [Enforce](https://docs.runlayer.com/shadow-ai/enforce.md)
>
> `Mode` — Monitor activity, Protect with scanner actions and allow-unless-denied MCP governance, or Enforce with deny-by-default governance

> [card] [Protect policy](https://docs.runlayer.com/shadow-ai/protect/policy.md)
>
> Allow MCP sources by default while blocking explicit remote, package, and built-in denylist matches

> [card] [Sessions](https://docs.runlayer.com/platform-sessions.md)
>
> **Sessions** setting — collect lifecycle telemetry for prompts, tool calls, and responses

> [card] [Browser extension](https://docs.runlayer.com/shadow-ai/browser-extension.md)
>
> Monitor and protect supported AI web chats in managed Chrome, Edge, and Firefox

> [card] [User and Identity Mapping](https://docs.runlayer.com/shadow-ai/identity-mapping.md)
>
> Map device usernames to Runlayer users for discoveries, sessions, and audit

***

## 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 AI **Details** tab or the **Settings → AI client allowlist** page. 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 Endpoint Modes

Project and client-config detection is always enabled after AI Watch is installed. Before the first successful settings sync, the endpoint starts in Monitor with Sessions and optional runtime discovery disabled, so no hooks are installed. One organization API key authenticates AI Watch scans, hooks, session events, and managed updates; no enrollment keys are required.

| Capability | Configuration | What it does |
| - | - | - |
| **Detect** | Always on | Discovers AI clients, shadow MCP servers, skills, and plugins from project and client configuration files |
| **Running processes** | `DetectProcesses` / `AIWATCH_DETECT_PROCESSES` | Discovers AI tooling and configured MCP servers from running processes and listening sockets |
| **Containers and WSL** | `DetectContainers` / `AIWATCH_DETECT_CONTAINERS` | Performs read-only MCP config, skill, and agent-definition discovery inside running Docker, Podman, or nerdctl containers through a Docker-CLI-compatible CLI or local Engine API socket; on Linux, also scans k3s through root-only `k3s crictl`; on Windows, also scans bounded WSL home project trees |
| **Monitor** | `Mode=monitor` / `AIWATCH_MODE=monitor` | Reports endpoint hook activity without applying scanner or governance decisions |
| **Protect** | `Mode=protect` / `AIWATCH_MODE=protect` | Applies scanner-configured Block and Mask decisions plus fail-open, allow-unless-denied MCP source governance; explicit denylist matches are blocked |
| **Enforce** | `Mode=enforce` / `AIWATCH_MODE=enforce` | Applies scanner and local policy decisions to non-MCP tools plus fail-closed, deny-by-default MCP source governance; managed MCP calls scan at the gateway |
| **Sessions** | `Sessions` / `AIWATCH_SESSIONS` | Installs the full event hook set for [Sessions](https://docs.runlayer.com/platform-sessions.md) telemetry |
| **Track MCP tool usage without content** | `MCPUsageMetadata` (Monitor mode, Sessions off) | Installs one lightweight MCP pre-call hook per supported client that reports only the client, tool name, MCP server name, and device/user identity — never request arguments, responses, session content, or transcripts |

* **Running-process and container discovery** are disabled until the synced settings enable them.
* **Monitor** is the default mode.
* **Sessions and hooks fail closed before settings sync.** A successful settings sync or an explicit legacy MDM `Sessions=true` / Protect / Enforce setting enables them.
* **Sessions coverage follows the client surface.** Installing the full hook set does not make a client emit events it does not support. Cursor's classic IDE and Agents Window load the endpoint hook config, while Cursor CLI emits a subset. Cursor Cloud Agents require the separate [repository/team hook collector](https://docs.runlayer.com/shadow-ai/cursor-cloud-agents.md); it is monitor-only and does not inherit endpoint configuration.

Hooks are installed whenever Mode is Protect/Enforce, Sessions is enabled, or **Track MCP tool usage without content** is enabled; otherwise AI Watch removes stale Runlayer hooks while preserving third-party hooks.

> [!NOTE]
>
> **Legacy fleets only:** on AI Watch builds that predate settings sync, push the native keys manually and pair them — Monitor with `Enforcement=false`, Protect and Enforce with `Enforcement=true`. A valid `Mode` value overrides the legacy `Enforcement` boolean.

On macOS and Windows, admins can change Mode, Sessions, process/container discovery, project depth, and project timeout from **Settings → AI Watch → Manage settings**. Devices fetch the complete settings snapshot during the privileged hook reconcile, which runs every 15 minutes, without an MDM policy update. The same settings page can install or remove the managed Chrome, Edge, and Firefox extensions and configure their mode and Sessions behavior without an MDM policy update. See [Browser extension](https://docs.runlayer.com/shadow-ai/browser-extension.md) for the AI Watch version each browser and platform requires. The tenant host, organization API key, and CPU/memory limits remain MDM-owned.

**Advanced scan tuning (optional).** Detect scans walk each user's home directory to a bounded depth within a per-scan time budget, and keep CPU and memory use within configurable 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 a smaller footprint on constrained hosts (lower the CPU / memory caps).

| Setting | Configuration | Default | Range |
| - | - | - | - |
| **Project depth** | `ProjectDepth` | `7` | `1`–`20` |
| **Project timeout** | `ProjectTimeout` | `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` | `512`–`8192` |

All are integers. Project depth and timeout are delivered by the Runlayer settings sync on macOS and Windows; native MDM values remain a legacy fallback. CPU and memory caps remain MDM-owned (`<integer>` on macOS, matching `AIWATCH_*` MSI properties on Windows). Omit them to keep the defaults. Values outside the range are clamped; non-integer or non-positive values are ignored. The CPU / memory caps are best-effort: the scan is throttled to stay within the configured CPU budget and aborts if it exceeds the memory ceiling.

> [!WARNING]
>
> A fresh install starts in Monitor with Sessions off and no hooks. Protect, Enforce, Sessions, and optional discovery turn on only after the device's first successful settings sync.

Start with [Deploy AI Watch](https://docs.runlayer.com/shadow-ai/deploy.md) to install the package and choose Mode / Sessions configuration in Runlayer. Detect scans run by default after deployment.

***

## The Shadow AI page

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

* **Overview** — discovery trends and highlights, including the **Shadow vs Managed** trend over time
* **Activity** — a filterable log of AI Watch activity, such as hook events and observed MCP tool calls
* **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
* **Details** — the per-device inventory: Client, MCP, Skill, Plugin, Agent, and Custom agent rows with type filters and a managed vs. shadow breakdown
* **Devices** — AI Watch device fleet mode and health, Sessions health, OS versions, and tool versions across enrolled devices

### The Devices tab

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

* **Mode and health** — each row shows a **Mode** badge (`Monitor`, `Protect`, or `Enforce`), a **Status** badge, and a **Sessions** badge. Hover an `Error` or `Drifted` status to see the error message and when it occurred.
* **Versions** — the **Tool version** column shows each device's installed AI Watch version, alongside **OS**, **OS version**, and **Last seen**. Use this to track upgrade progress.
* **Filtering** — narrow the table by Detect, Protect, Enforce, or Sessions status, device, user, OS, or OS version; columns are sortable.

***

## Related Resources

> [card] [Re-analyzing Classifications](https://docs.runlayer.com/shadow-ai/re-analyzing.md)
>
> Refresh server and skill classifications after changes

> [card] [Responding to Discoveries](https://docs.runlayer.com/shadow-ai/responding-to-discoveries.md)
>
> Security team response framework

> [card] [Troubleshooting](https://docs.runlayer.com/shadow-ai/troubleshooting.md)
>
> Common issues and solutions

> [card] [FAQ](https://docs.runlayer.com/shadow-ai/faq.md)
>
> Pre-deployment, security-review, and operational questions

> [card] [Remove AI Watch](https://docs.runlayer.com/shadow-ai/deploy/remove.md)
>
> Remove package-based and legacy script-based deployments


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.