Skip to main content

MCP server for ShieldPi Watchtower — run LLM security scans, generate drop-in guardrails from scan findings, operate the AI SOC analyst (incident triage + kill-chain reconstruction), and query the live agent monitor from Claude Desktop / Cursor / Continue.

Project description

shieldpi-mcp

MCP server for ShieldPi Watchtower — query 27,000+ LLM attack techniques, run scans, pull breach forensics, generate drop-in runtime guardrails from scan findings, and operate the Live Agent Monitor SOC from Claude Desktop / Cursor / Continue.

PyPI License Leaderboard

ShieldPi is the AI SOC platform:

  • Scanner — 27,024+ attack techniques × 4 scan modes (Browser / API / Agent / Model), ExploitDepth L1–L4 scoring, and forensic kill-chain narratives with extracted breach evidence.
  • Runtime monitor — the shieldpi SDK. Zero-code-change install for LangChain / LangGraph / OpenAI Assistants / Anthropic SDK: pip install "shieldpi[all]" then import shieldpi.auto. Every tool call, LLM call, and user message streams to ShieldPi's six detectors in real time.
  • Auto-guardrails (new in v0.3.0) — every L2+ finding from a scan becomes a deployable runtime guardrail. Export as drop-in Python middleware, LangChain callback, or NeMo Colang.

This MCP server exposes all three surfaces inside any MCP-compatible LLM session.

What you get — 23 tools

Tier Tool API key? Use it for
1 get_methodology no Pull the V7 scoring + dedup + judge methodology
1 get_attack_graph no Cross-customer success-rate graph by technique × model family
1 get_model_families no ShieldPi's family taxonomy + similarity edges
1 get_leaderboard_feed no Live data behind shieldpi.info
1 get_leaderboard no Top models by best security score
1 get_model_registry no All 38+ models ShieldPi can test
2 list_attack_categories yes The 15 categories + OWASP mappings
2 list_attack_techniques yes Browse the 27k catalog with filters
2 start_scan yes Kick off a scan against a target
2 get_scan_status yes Poll an in-progress scan
2 get_scan_intelligence yes Breach-forensics package for a completed scan
2 get_scan_guardrails yes Auto-generated runtime guardrails from scan findings
2 export_scan_guardrails yes Export guardrails as Python / LangChain / NeMo Colang
2 get_incidents 🆕 yes AI-triaged incidents (clusters of related alerts)
2 get_incident_detail 🆕 yes Kill chain + linked alerts + AI verdict for one incident
2 trigger_triage 🆕 yes Run an on-demand triage pass (sync; beat also runs 60s)
2 set_incident_status 🆕 yes Human override: escalate / resolve / suppress
2 get_live_alerts yes Runtime alerts from deployed monitored agents
2 get_alert_detail yes Full forensic detail for one alert (kill chain replay)
2 acknowledge_alert yes Mark an alert as triaged
2 resolve_alert yes Mark an alert as resolved
2 list_monitor_sessions yes Sessions across all monitored agents
2 get_session_events yes Full event chain for one session

🆕 = new in v0.4.0 (AI SOC analyst). Incidents are Claude-triaged clusters of raw alerts; each carries a structured verdict with severity, false-positive likelihood, attacker intent, kill-chain reconstruction, and a recommended action. A background Celery beat job runs triage every 60 seconds; trigger_triage forces an immediate run.

Tier-1 works the moment you install. Tier-2 needs a free ShieldPi API key — get one at shieldpi.io/dashboard/api-keys.

Companion: the shieldpi SDK

The MCP server is the read side of ShieldPi — it queries scans, alerts, and guardrails. The write side (capturing agent events in the first place) is the shieldpi Python SDK. In any monitored agent:

pip install "shieldpi[all]"
export SHIELDPI_SDK_KEY=shpi_live_...
import shieldpi.auto   # ONE line, zero code changes

That's it — LangChain / LangGraph / OpenAI Assistants / Anthropic tool-use calls are auto-captured. Alerts land in your dashboard, flow to Slack via webhook, and are queryable here via get_live_alerts. See the docs for the full wiring.

Install

Recommended (works on every OS, puts shieldpi-mcp on your $PATH):

pipx install shieldpi-mcp

Don't have pipx? brew install pipx && pipx ensurepath (macOS) or python3 -m pip install --user pipx && pipx ensurepath (Linux/Windows).

Why pipx: Claude Desktop / Cursor / Continue look up shieldpi-mcp on $PATH. pipx handles that automatically. Plain pip install may put the entry point somewhere your MCP client can't find.

Alternative — pip with an explicit modern Python (Python 3.10+ is required):

python3.11 -m pip install --user shieldpi-mcp
# then add ~/Library/Python/3.11/bin (macOS) or ~/.local/bin (Linux) to your PATH

If you see ERROR: Could not find a version that satisfies the requirement shieldpi-mcp, your default pip is using a Python older than 3.10 (common on macOS, where the system python3 is 3.9). Use pipx or pick a modern Python explicitly as above.

Or with uv:

uv tool install shieldpi-mcp

The package ships a shieldpi-mcp console entry point that runs the server over stdio — that's what every MCP client expects.

Configure your client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "shieldpi": {
      "command": "shieldpi-mcp",
      "env": {
        "SHIELDPI_API_KEY": "shpi_live_..."
      }
    }
  }
}

Restart Claude Desktop. Look for the 🔌 plug icon — shieldpi should be listed with 23 tools.

Claude Code

claude mcp add shieldpi -- shieldpi-mcp

Then set the env var in the same shell or in your .envrc:

export SHIELDPI_API_KEY="shpi_live_..."

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "shieldpi": {
      "command": "shieldpi-mcp",
      "env": { "SHIELDPI_API_KEY": "shpi_live_..." }
    }
  }
}

Continue (VS Code / JetBrains)

In ~/.continue/config.json:

{
  "mcpServers": {
    "shieldpi": {
      "command": "shieldpi-mcp",
      "env": { "SHIELDPI_API_KEY": "shpi_live_..." }
    }
  }
}

Try it

Once installed and configured, ask your LLM:

"Using the shieldpi tools, what's the current security ranking of Claude Sonnet 4.5 vs GPT-4o?"

"Pull the ShieldPi methodology and explain ExploitDepth scoring in plain English."

"Browse the prompt_injection category in the ShieldPi attack catalog and pick 3 techniques worth testing on my agent."

"Start a model-mode scan against anthropic/claude-sonnet-4.5 and report when it's done."

"Get the auto-generated guardrails for scan <uuid> as a LangChain callback I can paste into my agent."

"Check get_live_alerts for anything critical on my production agents in the last hour, group by detector, and walk me through the worst one via get_alert_detail."

"Call get_incidents with severity=critical. For each incident that isn't already suppressed, pull get_incident_detail, summarize the AI kill-chain reconstruction, and tell me which one deserves human escalation."

"Run trigger_triage on target {uuid} to get fresh verdicts on the last hour of alerts, then list any new incidents flagged as false positives."

Environment variables

Variable Default Purpose
SHIELDPI_API_KEY (none) Required for tier-2 tools (techniques catalog, scans). Free tier works.
SHIELDPI_API_BASE https://api.shieldpi.io Override for self-hosted ShieldPi or staging.
SHIELDPI_TIMEOUT 30 Per-request timeout in seconds.

Develop

git clone https://github.com/ShieldPi1/shieldpi-watchtower.git
cd shieldpi-watchtower/mcp-server
pip install -e ".[dev]"
pytest

The test suite hits live api.shieldpi.io for tier-1 endpoints and skips tier-2 unless SHIELDPI_API_KEY is set.

Architecture

┌─────────────────────────────────────────────────────────────────┐
│            Claude Desktop / Claude Code / Cursor                 │
│                  (MCP Client over stdio)                         │
└──────────────────────────────┬──────────────────────────────────┘
                               │ MCP (JSON-RPC over stdio)
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                    shieldpi-mcp (Python)                         │
│  ┌──────────────┐  ┌─────────────────┐                          │
│  │  10 MCP      │  │ ShieldPiClient  │                          │
│  │  tools       │  │   (httpx)       │                          │
│  └──────┬───────┘  └────────┬────────┘                          │
└─────────┼───────────────────┼────────────────────────────────────┘
          │                   │ HTTPS outbound only
          │                   ▼
          │       ┌─────────────────────────────┐
          │       │  https://api.shieldpi.io   │
          │       │  (FastAPI on Hetzner)       │
          │       └─────────────────────────────┘
          ▼
   stdout (MCP responses)

Outbound HTTPS only. No inbound ports. API keys are read from env vars, never logged. The server is single-process, stateless across requests — safe to drop into any client.

License

MIT. See LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shieldpi_mcp-0.4.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shieldpi_mcp-0.4.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file shieldpi_mcp-0.4.0.tar.gz.

File metadata

  • Download URL: shieldpi_mcp-0.4.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for shieldpi_mcp-0.4.0.tar.gz
Algorithm Hash digest
SHA256 970294b24d6e517eca00e142a661803617d9c4f4a52bcb89aa31b308950dfe28
MD5 80cb12efdc2592953269d2aa5fcafb65
BLAKE2b-256 197de8ef55c9a96a3b74e584ae27cbb769ce497f396b3a3bd7416bde1dc88f37

See more details on using hashes here.

File details

Details for the file shieldpi_mcp-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: shieldpi_mcp-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for shieldpi_mcp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 214a2677d9d532dc78e854150bb38642a7985086733e61bc2966e6ba8fd69b6d
MD5 7a8452127ab7d94971cb90c6cca5d146
BLAKE2b-256 3e7e4d9a91778c8dd69c8d5e198ca411fde7e1c6589002416a7bdf803992caf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page