
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
mcp-defender
Advanced tools
MCP server for Microsoft Defender Advanced Hunting - execute KQL queries via natural language
mcp-name: io.github.trickyfalcon/mcp-defender
An MCP (Model Context Protocol) server for Microsoft Defender Advanced Hunting. Enables AI assistants to investigate security events using natural language by translating queries to KQL and executing them against Defender.
User: "Show me suspicious PowerShell activity in the last hour"
↓
AI translates to KQL using schema knowledge
↓
MCP executes query against Defender API
↓
AI interprets and explains the results
AdvancedQuery.Read.All - Run advanced queriespip install mcp-defender
# Clone the repository
git clone https://github.com/trickyfalcon/mcp-defender.git
cd mcp-defender
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e ".[dev]"
.env.example to .envAZURE_TENANT_ID=your-tenant-id
AZURE_CLIENT_ID=your-client-id
# Option 1: Certificate authentication (recommended)
AZURE_CLIENT_CERTIFICATE_PATH=/path/to/combined.pem
# Option 2: Client secret authentication
# AZURE_CLIENT_SECRET=your-client-secret
For certificate authentication, combine your private key and certificate:
cat private.key cert.pem > combined.pem
mcp-defender
npx @modelcontextprotocol/inspector mcp-defender
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"defender": {
"command": "/path/to/mcp-defender/.venv/bin/python",
"args": ["-m", "mcp_defender.server"],
"env": {
"PYTHONPATH": "/path/to/mcp-defender/src",
"AZURE_TENANT_ID": "your-tenant-id",
"AZURE_CLIENT_ID": "your-client-id",
"AZURE_CLIENT_CERTIFICATE_PATH": "/path/to/combined.pem"
}
}
}
}
| Tool | Description |
|---|---|
run_hunting_query | Execute KQL queries against Advanced Hunting |
get_hunting_schema | Get available tables and columns dynamically |
Once connected to Claude, you can ask:
// Find failed logon attempts
DeviceLogonEvents
| where ActionType == "LogonFailed"
| where Timestamp > ago(24h)
| summarize FailedAttempts = count() by AccountName, DeviceName
| top 10 by FailedAttempts
// Detect suspicious PowerShell
DeviceProcessEvents
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine has_any ("encodedcommand", "bypass", "hidden", "downloadstring")
| project Timestamp, DeviceName, AccountName, ProcessCommandLine
// Network connections to external IPs
DeviceNetworkEvents
| where RemoteIPType == "Public"
| where Timestamp > ago(1h)
| summarize ConnectionCount = count() by DeviceName, RemoteIP
| top 20 by ConnectionCount
# Run tests
pytest
# Lint code
ruff check .
# Type check
mypy src
# Security scan
bandit -r src
This server uses the WindowsDefenderATP API:
https://api.securitycenter.microsoft.comPOST /api/advancedqueries/runMIT
FAQs
MCP server for Microsoft Defender Advanced Hunting - execute KQL queries via natural language
The pypi package mcp-defender receives a total of 34 weekly downloads. As such, mcp-defender popularity was classified as not popular.
We found that mcp-defender demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.