← Back to SOC feed Coverage →

AI Agents - MCP Tool Configured

kql MEDIUM Azure-Sentinel
T1059
backdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-04-21T09:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may configure MCP tools in AI agents to exfiltrate data or execute malicious commands through extended agent capabilities. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect potential misuse of AI agents and mitigate associated security risks.

KQL Query

AIAgentsInfo 
| where RegistrySource != "A365"
| summarize arg_max(Timestamp, *) by AIAgentId 
| where AgentStatus != "Deleted" 
| mvexpand Action = AgentToolsDetails 
| where  Action.action.operationDetails["$kind"] == "ModelContextProtocolMetadata" 
| extend MCPName = tostring(Action.modelDisplayName) 
| summarize MCPTools = make_set(MCPName) by AIAgentName, AIAgentId, EnvironmentId, CreatorAccountUpn 

Analytic Rule Definition

id: 6d8e5f9a-0b1c-2d3e-4f5a-6b7c8d9e0f1a
name: AI Agents - MCP Tool Configured
description: |
  This query identifies Copilot Studio AI agents that have Model Context Protocol (MCP) tools configured.
  MCP tools extend agent capabilities but introduce additional security considerations because they can execute advanced operations and interact with external resources.
  If misconfigured or unnecessary, these tools may increase the attack surface and expose sensitive data or functionality.
  Recommended Action: Confirm with the agent owner whether the MCP tool is still required. If it is, review its configuration for compliance with security best practices and ensure least privilege access.
  Remove any unused or unnecessary MCP tools to reduce risk.
requiredDataConnectors: []
tactics:
  - Execution
relevantTechniques:
  - T1059
query: |
  AIAgentsInfo 
  | where RegistrySource != "A365"
  | summarize arg_max(Timestamp, *) by AIAgentId 
  | where AgentStatus != "Deleted" 
  | mvexpand Action = AgentToolsDetails 
  | where  Action.action.operationDetails["$kind"] == "ModelContextProtocolMetadata" 
  | extend MCPName = tostring(Action.modelDisplayName) 
  | summarize MCPTools = make_set(MCPName) by AIAgentName, AIAgentId, EnvironmentId, CreatorAccountUpn 
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: CreatorAccountUpn
  - entityType: Host
    fieldMappings:
      - identifier: HostName
        columnName: AIAgentName
version: 1.0.0

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/AI Agents/Copilot Studio Connector/AIAgentsMCPToolConfigured.yaml