Skip to content
Cisco AI Defense logo
CiscoAI Security

MCP scanner — DefenseClaw

Overview

MCP (Model Context Protocol) servers are long-lived processes that expose tools to the agent over stdio or HTTP. They're riskier than skills: a compromised MCP server can exfiltrate data, destroy filesystems, or inject prompts into every subsequent call. DefenseClaw manages MCP entries with defenseclaw mcp set / unset and scans them with defenseclaw mcp scan.

Configure it

defenseclaw setup mcp-scanner

Wizard questions:

  1. Analyzer list (yara, api, llm, behavioral, readiness).
  2. Unified LLM provider/model when the LLM analyzer is enabled.
  3. Cisco AI Defense API analyzer settings when the API analyzer is enabled.
  4. Whether to scan MCP prompts, resources, and server instructions.

Non-interactive:

defenseclaw setup mcp-scanner \
  --non-interactive \
  --analyzers yara,behavioral,readiness \
  --scan-prompts \
  --scan-resources \
  --scan-instructions

See the autogenerated setup command page for the full flag table.

Analyzers

AnalyzerWhat it flags
Manifest validationInvalid mcp.json, missing required fields, unsigned server manifests
YARAPattern-based findings from the scanner ruleset
APICisco AI Defense remote analyzer when configured
LLMSemantic analysis through the unified llm: block
BehavioralBehavioral checks over server/tool metadata
ReadinessRuntime readiness and manifest sanity checks

Findings land in the audit store with scanner=mcp. EventScanFinding.rule_id matches the analyzer; tool_id records which declared tool is responsible.

Verify it worked

defenseclaw mcp scan my-mcp
defenseclaw tui     # watch scans arrive live

defenseclaw mcp scan accepts --json, --analyzers, --scan-prompts, --scan-resources, --scan-instructions, and --all for the current OpenClaw MCP config.

Undo

defenseclaw setup mcp-scanner --non-interactive --analyzers yara,readiness

Or edit config.yaml directly when you need a setting that is not exposed through the setup wizard, then restart defenseclaw-gateway.

Troubleshooting

SymptomCauseFix
mcp-scanner: requires Python >=3.11 (skipped)Python 3.10 interpreterReinstall under 3.11+
tool-graph analysis: timeoutA behavioral analyzer took too long on a complex serverTemporarily remove behavioral from --analyzers
No findings but you expected someAnalyzer list is too narrowRe-run setup with --analyzers yara,api,llm,behavioral,readiness

Related