Skip to main content
Glama
Defender-MCP

Defender-MCP

by kkaminsk

Defender-MCP

A lightweight Model Context Protocol (MCP) server that uses PowerShell only to scan files and report Windows Defender antivirus state.

Tools

Tool

Description

scan_file

Scan a single file path using Windows Defender

quick_scan

Trigger a system-wide quick scan

get_status

Report current antivirus state

Related MCP server: Windows Admin MCP

Setup

npm install
npm run build

Usage

{
  "mcpServers": {
    "defender": {
      "command": "node",
      "args": ["C:/Temp/GitHub/Defender-MCP/dist/index.js"]
    }
  }
}

Environment Variables

Variable

Default

Description

DEFENDER_FILE_SCAN_TIMEOUT_MS

60000

File scan timeout in ms (clamped to 1000..3600000)

DEFENDER_QUICK_SCAN_TIMEOUT_MS

600000

Quick scan timeout in ms (clamped to 1000..3600000)

DEFENDER_STATUS_TIMEOUT_MS

30000

Status query timeout in ms (clamped to 1000..3600000)

DEFENDER_ALLOWED_PATHS

current working directory

Comma-separated absolute allowlist for scan_file; use * to disable restriction

DEFENDER_EXECUTION_POLICY

RemoteSigned

PowerShell execution policy (Bypass is opt-in if explicitly set)

DEFENDER_POWERSHELL_PATH

powershell.exe

PowerShell executable

Requirements

  • Windows with Windows Defender

  • Node.js >= 18

  • Elevated privileges are not required for basic status queries; scan behavior can vary by local policy.

Testing

npm test

Available Tools

3 tools
get_statusB

Get Windows Defender antivirus status

Inputs: no named parameters.

quick_scanB

Run a Windows Defender quick scan

Inputs: no named parameters.

scan_fileC

Scan a single file using Windows Defender

Inputs: file_path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 3 tools

    Disambiguation4/5

    quick_scan and scan_file both trigger scans but are distinguished by scope (whole-system quick scan vs single file), and get_status is clearly a read-only operation. Boundaries are understandable, though the two scan tools could momentarily be confused without reading descriptions.

    Naming Consistency4/5

    All three names are snake_case with a verb-first reading (quick_scan, get_status, scan_file). quick_scan is a slight deviation in that it leads with an adjective rather than a clean verb_noun form, but overall the pattern is predictable.

    Tool Count3/5

    Three tools is a minimal but focused surface for antivirus management, and each earns its place. However, the set feels thin for a domain with obvious adjacent operations (updates, history, remediation), so it sits on the low edge of well-scoped.

    Completeness2/5

    The surface covers scanning and status only; there is no way to update signatures, view scan/threat history, quarantine or restore items, or toggle real-time protection. These are significant gaps that would force an agent to dead-end on common Defender workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers