Microsoft Defender MCP Server
for AI Agents
Connect your AI agent to StackOne's Microsoft Defender MCP server and give it 23 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
23 Agent Actions
Agents can read, write, delete and run operations in Microsoft Defender. Extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your Microsoft Defender MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every Microsoft Defender tool response scanned for prompt injection in milliseconds, with 88.7% accuracy, all running on CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Microsoft Defender call.
Tools Discovery →What is the Microsoft Defender MCP Server?
A Microsoft Defender MCP server lets AI agents read and write Microsoft Defender data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's Microsoft Defender MCP server ships with 23 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All Microsoft Defender MCP Tools
Every StackOne action for Microsoft Defender, ready for your agent. Read, write, delete and run operations, scoped to exactly what you need.
Alerts
- List Alerts
List security alerts raised by Microsoft Defender and integrated providers.
- Get Alert
Get a single security alert by its ID, including evidence and the policy that generated it.
- Update Alert
Update an alert's status, classification, determination, assignee or custom details.
Alert Comments
- Create Alert Comment
Add a comment to an existing security alert.
Analyzed Emails
- List Analyzed Emails
List emails analyzed by Microsoft Defender for Office 365 (Threat Explorer data) within a time window.
- Get Analyzed Email
Get one email analyzed by Microsoft Defender for Office 365, including verdicts, policy actions, URLs and attachments.
Remediate Analyzed Emails
- Remediate Analyzed Emails
Remove a threat from users' mailboxes by moving or deleting analyzed emails, or move false positives back to the inbox.
Audit Log Queries
- List Audit Log Queries
List unified audit log queries created in the tenant and their status.
Audit Log Querys
- Create Audit Log Query
Start an asynchronous search of the Microsoft 365 unified audit log.
- Get Audit Log Query
Get an audit log query and its current status.
Audit Log Records
- List Audit Log Records
List the audit log records returned by a completed audit log query.
Email Threat Submissions
- Create Email Threat Submission
Submit a suspected spam, phishing or malware email, or a false positive, to Microsoft Defender for Office 365.
- List Email Threat Submissions
List emails reported to Microsoft Defender for Office 365 as spam, phishing, malware or false positives.
- Get Email Threat Submission
Get a single email threat submission and its rescan result.
Review Email Threat Submissions
- Review Email Threat Submission
Record an administrator's review verdict on a user-reported email threat submission.
Run Hunting Querys
- Run Hunting Query
Run a Kusto (KQL) advanced hunting query over up to 30 days of Microsoft Defender data, including email events.
Incidents
- List Incidents
List Microsoft Defender incidents that correlate related alerts into a single attack story.
- Get Incident
Get a single Microsoft Defender incident by its ID.
- Update Incident
Update an incident's status, assignee, classification, determination, severity or tags.
Incident Comments
- Create Incident Comment
Add a comment to an existing Microsoft Defender incident.
Threat Assessment Requests
- Create Threat Assessment Request
Submit a mail message, email file, file or URL for Microsoft to assess and report the policy result.
- List Threat Assessment Requests
List threat assessment requests submitted to check how Microsoft's scanning judges mail, files or URLs.
- Get Threat Assessment Request
Get a threat assessment request, optionally expanding its policy check and rescan results.
Set Up Your Microsoft Defender MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Microsoft Defender in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}Platform Resources
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What Hundreds of Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building hundreds of connectors that serve both, here's when each approach wins.
14 min read
Microsoft Defender MCP Server FAQ
Does StackOne have a Microsoft Defender MCP server?
Microsoft Defender MCP server vs direct API integration: what's the difference?
How does Microsoft Defender authentication work for AI agents?
origin_owner_id.Are Microsoft Defender MCP tools vulnerable to prompt injection?
What is the context bloat of a Microsoft Defender agent and how do I avoid it?
Can I limit which actions my Microsoft Defender agent can access?
Can I create custom agent actions for my Microsoft Defender MCP server?
When should I NOT use a Microsoft Defender MCP server?
What AI frameworks and AI clients does the StackOne Microsoft Defender MCP server support?
Put your AI agents to work
All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.