Deploy via Microsoft Defender Endpoint
Overview
Microsoft Defender for Endpoint provides centralized visibility and remote management for enterprise devices. Microsoft Defender Live Response allows you to run scripts remotely on managed devices.
You can use Microsoft Defender Live Response to deploy the Akto MCP Endpoint Shield hook on developer machines. Hook installation enables Akto to monitor agent interactions from tools such as Cursor, Claude, or Gemini.
Prerequisites
Microsoft Defender integration requires the following environment configuration.
Administrator access to the Microsoft Defender portal
Microsoft Defender for Endpoint license
Devices onboarded to Microsoft Defender for Endpoint
Supported operating systems: macOS, Windows, Linux

Devices must be onboarded using one of the supported onboarding methods:
Microsoft Intune onboarding
Local onboarding script or installation package
Verify device enrolment before running queries or deploying hooks.
Open the Microsoft Defender portal.
Navigate to Assets → Devices.
Confirm that device status shows Active.
Active device status confirms that Microsoft Defender receives endpoint telemetry.
Steps to Deploy
The deployment workflow consists of two stages:
Optional visibility queries to identify AI agents and MCP usage across devices.
Installation of the Akto MCP Endpoint Shield hook on developer machines.
(Optional) Identify AI Agent Software Installed on Devices
Software inventory queries help you identify which AI development tools exist across enterprise devices.
Open the Microsoft Defender portal.
Navigate to Investigation & response → Hunting → Advanced hunting.

Paste the following query into the query editor.
Replace
<your-device-name>with a hostname from the Devices inventory.Click Run query.
Query results show devices where AI tools such as Cursor, Windsurf, Claude, VS Code, or Codex are installed.
Remove the DeviceName filter to scan the entire device fleet.
(Optional) Identify AI CLI Activity on Devices
Process telemetry queries help you determine which devices actively run AI CLI agents.
Open Advanced hunting in the Microsoft Defender portal.
Paste the following query into the query editor.
Replace
<your-device-name>with the target device hostname.Click Run query.
Query results show which CLI tools run on enterprise devices, including Claude CLI, GitHub Copilot CLI, Gemini CLI, Codex CLI, and Cursor CLI.
(Optional) Detect MCP Configuration File Usage
MCP configuration files often define agent integrations and tool execution paths. Process telemetry queries help you detect devices referencing MCP configuration files.
Open Advanced hunting in the Microsoft Defender portal.
Paste the following query into the editor.
Replace
<your-device-name>with the device hostname.Click Run query.
Query results show devices referencing MCP configuration files such as:
mcp.jsonmcp_config.jsonclaude_desktop_config.json
You can modify the query to add or remove file names depending on the MCP configurations used in your environment.
Request the MCP Endpoint Shield Hook Script from Akto
MCP Endpoint Shield deployment requires a hook installation script provided by Akto.
Contact the Akto support team at [email protected] to obtain the required hook script.
Upload the Hook Script to the Microsoft Defender Live Response Library
Microsoft Defender Live Response allows you to run scripts remotely on enterprise devices.
Open the Microsoft Defender portal.
Navigate to Settings.
Select Endpoints → General → Live response library.
Click Upload file.

Upload the hook script received from the Akto support team.
Example script files include:
install_cursor_hooks.shinstall_claude_hooks.sh
Add a description such as Akto – Install MCP Endpoint Shield hooks.
Click Save.
The script must exist in the Live Response library before execution. Upload the script again whenever the script version changes.
Run the Hook Script on a Device Using Live Response
Microsoft Defender Live Response allows script execution on individual devices.
Open the Microsoft Defender portal.
Navigate to Assets → Devices.
Select the target device.
Open the device details page.
Click Initiate live response session.
Wait until the Live Response session connects. Session initialization may take up to two minutes.
After the Live Response console opens, run the hook installation command.
Here we have taken the cursor hook script example:
The script name must match the file uploaded to the Live Response library.
The console displays execution output as the script runs.

Successful execution ends with:
Devices without the required IDE installed exit safely with the following output:
Operational Notes
Microsoft Defender Live Response requires Microsoft Defender for Endpoint Plan 2.
Microsoft Defender Advanced Hunting queries support a maximum time range of 30 days.
Queries scope to a single device by default using
DeviceName contains.Removing the device filter runs queries across the entire device fleet and may return larger result sets.
Get Support for your Akto setup
There are multiple ways to request support from Akto. We are 24X7 available on the following:
In-app
intercomsupport. Message us with your query on intercom in Akto dashboard and someone will reply.Join our discord channel for community support.
Contact
[email protected]for email support.
Last updated