What is MCP?
The Model Context Protocol (MCP) is an open standard that enables AI assistants to connect with external data sources and tools through a universal interface. In security operations, MCP servers bridge AI models with security platforms, enabling intelligent query, analysis, and response across your entire security ecosystem.
Connect
Bridge AI models with security tools via a standardized protocol for seamless data exchange
Extend
Build custom tools, resources, and prompts that AI assistants can discover and use dynamically
Deploy
Run MCP servers locally or in the cloud with stdio or SSE transport for production readiness
How MCP Works
MCP follows a client-server architecture where AI applications (hosts) communicate with MCP servers that expose tools, resources, and prompts through standardised transports.
MCP Primitives
🛠️ Tools
Executable functions that AI models can invoke. query Sentinel, run KQL, analyze alerts, trigger playbooks, or interact with any security API.
📂 Resources
Structured data that AI models can read. threat intelligence feeds, configuration files, incident reports, compliance documents, and log data.
💬 Prompts
Reusable prompt templates with arguments. pre-built investigation workflows, hunting procedures, and analysis frameworks for common security tasks.
Security MCP Use Cases
Sentinel MCP Server
Query Log Analytics workspaces, run KQL hunting queries, manage incidents, and trigger playbooks through AI-driven natural language interactions.
Defender XDR MCP Server
Investigate incidents, run advanced hunting queries, manage alerts, and perform device actions through a unified AI interface.
Threat Intelligence MCP Server
Aggregate threat intelligence from multiple sources, enrich IOCs, and provide contextual threat information to AI-powered SOC workflows.
Compliance MCP Server
Query compliance status, check policy adherence, generate compliance reports, and recommend configurations via Purview integration.
Build Your First MCP Server
Get started with MCP using TypeScript or Python. Here's a minimal example of a security-focused MCP server.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({
name: "security-mcp",
version: "1.0.0"
});
// Define a tool for querying security alerts
server.tool(
"query_alerts",
"Query security alerts from Microsoft Sentinel",
{
severity: z.enum(["High", "Medium", "Low"]).describe("Alert severity"),
timeRange: z.string().describe("Time range, e.g. '24h', '7d'"),
limit: z.number().default(10).describe("Max results to return")
},
async ({ severity, timeRange, limit }) => {
// Call Microsoft Graph Security API or Sentinel API
const alerts = await querySecurityAlerts(severity, timeRange, limit);
return {
content: [{ type: "text", text: JSON.stringify(alerts, null, 2) }]
};
}
);
const transport = new StdioServerTransport();
await server.connect(transport);from mcp.server.fastmcp import FastMCP
mcp = FastMCP("security-mcp")
@mcp.tool()
async def query_alerts(
severity: str,
time_range: str = "24h",
limit: int = 10
) -> str:
"""Query security alerts from Microsoft Sentinel.
Args:
severity: Alert severity. High, Medium, or Low
time_range: Time range, e.g. '24h', '7d'
limit: Maximum results to return
"""
# Call Microsoft Graph Security API or Sentinel API
alerts = await query_security_alerts(severity, time_range, limit)
return json.dumps(alerts, indent=2)
@mcp.resource("sentinel://incidents/{incident_id}")
async def get_incident(incident_id: str) -> str:
"""Retrieve a specific Sentinel incident by ID."""
incident = await fetch_incident(incident_id)
return json.dumps(incident, indent=2)
if __name__ == "__main__":
mcp.run()MCP Server Labs
MCP Server labs are currently in development. They will be published here as they are finalized and tested.
🚧
Coming Soon
Check back for hands-on labs covering Sentinel MCP, Defender XDR MCP, SSE deployment, and multi-server AI agents.