How to connect Microsoft Defender to Claude

Connect Claude Web, Desktop and Cowork to Microsoft Defender MCP. List high-severity microsoft defender incidents, submit a microsoft defender threat sample, and more using natural language, with authentication handled for you.

Microsoft Defender logoMicrosoft Defender
Oauth2S2s Oauth2

Microsoft Defender is Microsoft's cloud security service for detecting and investigating cyber threats. It provides unified visibility into alerts, incidents, devices, vulnerabilities, and threat intelligence.

89 Tools

Introduction

Claude is Anthropic's AI assistant, available on the web, in the desktop app, and on mobile. Cowork is its agent for knowledge work, and it runs on all of those surfaces too. Connected to your apps, Claude can work with your files and services to accomplish complex tasks on your behalf.

This guide walks you through the easiest and most secure way to connect your Microsoft Defender account to Claude via Composio Connect, enabling it to list high-severity Microsoft Defender incidents, submit a Microsoft Defender threat sample, check your Microsoft Defender secure score, and more such actions on your behalf without compromising your account security.

Setup is the same on Claude Web, Desktop, and Cowork, and you only need to do it once. The connector is tied to your account, so it's available in all three.

For exact tool slugs and parameter tables, see the tool catalog in the Composio docs.

Also integrate Microsoft Defender with

Connecting Microsoft Defender to Claude Web, Desktop, and Cowork

Two ways to add the Composio connector. Pick whichever you prefer.

1. Add with one click

Click the button. Claude opens with the Composio connector filled in. Click Add, then go to step 2.

Add to Claude

Add manually

In Claude Desktop, click Customize in the left sidebar, then select Connectors and click the + icon at the top.

Claude Desktop connectors screen with Add custom connector selected

Click Add custom connector and paste in the Composio MCP server URL:

bash
https://connect.composio.dev/mcp
Add custom connector dialog with Composio MCP server URL

2. Authorize in your browser

Click Connect. You'll be redirected to a browser window where you can authorize Composio to continue.

Composio authorization screen for Claude Web, Desktop, and Cowork

3. Connect your Microsoft Defender account

Back in Claude, ask it to connect to Microsoft Defender or give it any Microsoft Defender-related task.

For example, ask Claude to:

  • "List high-severity Microsoft Defender incidents"
  • "Submit a Microsoft Defender threat sample"
  • "Check your Microsoft Defender secure score"

It will prompt you to authenticate and authorize access.

That's it. Composio's tools are now available in Claude, and your Microsoft Defender account is ready to use.

What is the Microsoft Defender Claude Connector, and what's possible with it?

The Microsoft Defender MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Microsoft Defender account. It provides structured and secure access to security alerts and incidents, threat intelligence, secure scores, attack simulations, and threat submissions, so your agent can investigate alerts, add analyst comments, review threat data, assess security posture, and manage simulation campaigns on your behalf.

  • Alert and incident investigation: Have your agent retrieve Microsoft Defender alerts and incidents, then add comments to document analyst findings.
  • Threat intelligence research: Direct your agent to inspect hosts, reputations, WHOIS records, ports, cookies, trackers, subdomains, vulnerabilities, threat articles, and passive DNS records.
  • Security posture review: Let the agent retrieve secure scores and control profiles to help you understand your organization’s security posture.
  • Attack simulation management: Instruct your agent to create, retrieve, track, and delete attack simulations, inspect their payloads and pages, and review simulation report overviews.
  • Threat submission administration: Have your agent retrieve threat submissions and create, review, or delete email submission policies.

Troubleshooting

1. Why does Claude not use the Composio connector for Microsoft Defender?

The connector can show as connected, but Claude must use it in each Microsoft Defender conversation.

  • Click + at the lower left of the chat, or type /.
  • Hover Connectors.
  • Turn on Composio.
  • Ask Claude to connect to Microsoft Defender again.

2. Why does Claude show an MCP server error before Microsoft Defender connects?

Claude can show Couldn't reach the MCP server or Authorization with the MCP server failed when you add the connector for Microsoft Defender.

  • Check that the connector URL is https://connect.composio.dev/mcp.
  • Connectors run from Anthropic's cloud, so your device network is usually not the problem.
  • Add the connector again from Customize > Connectors, then ask Claude to connect Microsoft Defender.
  • If it fails again, send the error and the ofid_ reference id to support@composio.dev.

3. Why does the Microsoft Defender authorization link not work?

The Composio connector is one server. Your Microsoft Defender account connects separately when Claude asks for it.

  • If the browser does not open, or the link expires, ask Claude to retry the Microsoft Defender connection.
  • Composio creates a fresh Microsoft Defender authorization link.
  • Open that link in your browser and finish the Microsoft Defender sign-in.

4. Why do Microsoft Defender actions fail after they worked before?

The Microsoft Defender connection can expire or lose permission.

  • Ask Claude to inspect the Microsoft Defender connection.
  • If the connection is unhealthy, disconnect it when Claude prompts you.
  • Reconnect the Microsoft Defender account and retry the action.
  • If Claude shows a permission prompt, approve it before Claude changes data in Microsoft Defender.
  • If the action still fails with a permission error, check that the connected account has that permission in Microsoft Defender itself.

5. How do I switch to a different Microsoft Defender account?

Claude can manage the Microsoft Defender connection for you.

  • Ask Claude to disconnect or delete the current Microsoft Defender account.
  • Ask Claude to connect Microsoft Defender again.
  • Open the new Composio authorization link for Microsoft Defender.
  • Sign in with the other Microsoft Defender account in the browser.
  • After the account connects, ask Claude to retry the Microsoft Defender task.

6. Why is my Microsoft Defender connection missing in Claude Desktop or on a Team plan?

The connector belongs to your Claude account, so your Microsoft Defender connection works in Claude Web, Desktop, and Cowork.

  • In Claude Desktop, open Customize > Connectors.
  • Next to Composio, click ⋮ and click Clear cache.
  • If Microsoft Defender tools still do not appear, click ⋮, disconnect, remove the connector, and add it again.
  • On Team or Enterprise, an Owner or Primary Owner must enable the connector before you can connect Microsoft Defender.
TOOLS

Supported Tools

Every Microsoft Defender action and event your agent gets out of the box.

Add Alert Comment

Append a comment to a Microsoft Defender security alert.

Add Incident Comment

Append an analyst comment to a Microsoft Defender incident; comments cannot be removed by this action.

Create Email Submission Policy

Create an email threat-submission policy with the supplied settings.

Create Simulation

Create an attack simulation using payload, login-page, and landing-page resource IDs; acceptance is asynchronous.

Delete Email Submission Policy

Delete an email threat-submission policy by its Microsoft Graph identifier.

Delete Simulation

Delete an attack simulation campaign.

Get Alert

Retrieve the documented properties of a Microsoft Defender security alert.

Get Article Indicator

Read a Microsoft Defender Threat Intelligence article indicator.

Get Email Submission Policy

Get one email threat-submission policy by its Microsoft Graph identifier.

Get Host Component

Read a web component observed on a threat-intelligence host.

Get Host Cookie

Read a cookie observed on a Microsoft Defender Threat Intelligence host.

Get Host Pair

Read a parent-child host relationship observed by Microsoft Defender Threat Intelligence.

Get Host Port

Read a port observed on a Microsoft Defender Threat Intelligence host.

Get Host Reputation

Get the reputation properties and relationships for a threat-intelligence host.

Get Host Tracker

Read an internet tracker observed on a Microsoft Defender Threat Intelligence host.

Get Host WHOIS

Get the WHOIS record associated with a threat-intelligence host.

Get Incident

Retrieve a Microsoft Defender incident by its identifier.

Get Intelligence Profile

Get a Microsoft Defender threat-intelligence profile by identifier.

Get Intelligence Profile Indicator

Get a Microsoft Defender intelligence profile indicator by identifier.

Get Landing Page

Get a landing page associated with an attack simulation campaign.

Get Login Page

Get a login page associated with an attack simulation campaign.

Get Passive DNS Record

Get a Microsoft Defender passive DNS record by identifier.

Get Payload

Get an attack simulation campaign payload.

Get Payload Detail

Get detailed content for an attack simulation campaign payload.

Get Secure Score

Retrieve a Microsoft secure score by its provider-generated identifier.

Get Secure Score Control Profile

Retrieve a Microsoft secure score control profile by its identifier.

Get Simulation

Get an attack simulation campaign.

Get Simulation Automation

Get an attack simulation automation.

Get Simulation Landing Page

Get the landing page associated with an attack simulation campaign.

Get Simulation Login Page

Get the login page associated with an attack simulation campaign.

Get Simulation Operation

Get an attack simulation operation to track a long-running request.

Get Simulation Payload

Get the payload associated with an attack simulation campaign.

Get Simulation Report Overview

Get an overview of an attack simulation and training campaign.

Get Subdomain

Get a Microsoft Defender threat-intelligence subdomain by identifier.

Get Threat Article

Read a Microsoft Defender Threat Intelligence article by ID.

Get Threat Host

Read a hostname or IP address detected by Microsoft Defender Threat Intelligence.

Get Threat Submission

Get one email, file, or URL threat submission by its Microsoft Graph identifier.

Get Training

Get an attack simulation training resource.

Get Training Language Detail

Get localized language details for an attack simulation training.

Get Vulnerability

Get a Microsoft Defender threat-intelligence vulnerability by identifier.

Get Vulnerability Component

Get a component associated with a Microsoft Defender vulnerability.

Get WHOIS History Record

Get a Microsoft Defender WHOIS history record by identifier.

Get WHOIS Record

Get a Microsoft Defender WHOIS record by identifier.

List Alerts

Get a page of Microsoft Defender security alerts and their properties.

List Article Indicators

List indicators of threat or compromise associated with a threat article.

List Attack Simulation Repeat Offenders

Get one page of tenant users who yielded to attacks more than once in attack simulation campaigns.

List Email Submission Policies

Get the email threat-submission policies and their current settings.

List End User Notifications

Get one page of attack simulation end-user notification templates.

List Host Components

List web components observed on a Microsoft Defender Threat Intelligence host.

List Host Cookies

List cookies observed on a Microsoft Defender Threat Intelligence host.

List Host Pairs

List all, child, or parent host-pair relationships for a threat-intelligence host.

List Host Passive DNS

List passive-DNS records associated with a Microsoft Defender Threat Intelligence host.

List Host Ports

Get one page of ports associated with a Microsoft Defender threat-intelligence host.

List Host Reverse Passive DNS

Get one page of passive DNS records that resolve to the specified host.

List Host Subdomains

Get one page of subdomain resources associated with a threat-intelligence host.

List Host Trackers

Get one page of trackers associated with a threat-intelligence host.

List Host WHOIS History

Get one page of historical WHOIS records associated with a host.

List Incidents

Get one page of Microsoft Defender incidents and an opaque continuation cursor.

List Intelligence Profile Indicators

Get one page of indicators associated with a Microsoft Defender intelligence profile.

List Intelligence Profiles

Get one page of Microsoft Defender threat-intelligence profiles.

List Landing Pages

Get one page of landing pages for attack simulation campaigns.

List Login Pages

Get one page of login pages for attack simulation campaigns.

List Payloads

Get one page of payloads for attack simulation campaigns.

List Secure Score Control Profiles

Return one page of Microsoft secure score control profiles and an opaque continuation cursor.

List Secure Scores

Return one page of daily Microsoft secure scores and an opaque continuation cursor.

List Simulation Automation Runs

Get one page of runs for an attack simulation automation.

List Simulation Automations

Get one page of attack simulation automations.

List Simulations

Get one page of attack simulation campaigns.

List Simulation User Coverage

Get one page of attack simulation coverage records for tenant users.

List Simulation Users

List users and their recorded actions in an attack simulation campaign.

List Threat Articles

List Microsoft Defender Threat Intelligence articles one page at a time.

List Threat Submissions

List one page of email, file, or URL threat submissions visible to the connected account.

List Trainings

Get one page of attack simulation training resources.

List Training User Coverage

Get one page of training coverage records for tenant users in attack simulation campaigns.

List Vulnerability Components

Get one page of components associated with a Microsoft Defender vulnerability.

List WHOIS Record History

Get one page of historical records for a Microsoft Defender WHOIS record.

List WHOIS Records

Get one page of WHOIS records from Microsoft Defender threat intelligence.

Merge Incidents

Merge at least two Microsoft Defender incidents into one incident.

Move Alerts

Move one or more Microsoft Defender alerts to a new or existing incident.

Review Email Threat Submission

Record the administrator's review category for an email threat submission.

Run Hunting Query

Run a Kusto Query Language query against Microsoft Defender advanced-hunting data for the requested time span or workspace.

Submit Email Threat

Submit email content or a Microsoft Graph message URL for security analysis; this starts an external review workflow and cannot be undone here.

Submit File Threat

Submit base64 file content for security analysis; this starts an external review workflow and cannot be undone here.

Submit URL Threat

Submit a URL for security analysis; this starts an external review workflow and cannot be undone here.

Update Alert

Update one or more mutable properties of a Microsoft Defender security alert.

Update Email Submission Policy

Update one or more settings on an email threat-submission policy.

Update Incident

Update one or more editable properties of a Microsoft Defender incident.

Update Secure Score Control Profile

Update tenant state, assignment, comments, and required vendor information for a Microsoft secure score control profile.

Update Simulation

Update a draft attack simulation, optionally binding a payload by resource ID; acceptance does not mean completion.

FAQ

Frequently asked questions

Start with Microsoft Defender.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Microsoft Defender tool your agent needs.Free to start.

Start building