Documentation

Everything you need to secure your AI agents with SpiderShield.

Quickstart

Python SDK

python
pip install spidershield

from spidershield import SpiderGuard, Decision

guard = SpiderGuard(policy="balanced", dlp="redact")

# Check before tool execution
result = guard.check("execute_sql", {"query": "SELECT * FROM users"})
if result.decision == Decision.ALLOW:
    output = run_tool("execute_sql", {"query": "SELECT * FROM users"})
    # Scan output for secrets / PII
    clean = guard.after_check("execute_sql", output)

CLI

bash
# Guard mode — wrap any MCP server
"code-keyword">$ "code-function">spidershield guard "code-keyword">--preset balanced -- "code-function">npx @modelcontextprotocol/server-filesystem /tmp

# Scan mode — static security analysis
"code-keyword">$ "code-function">spidershield scan ./my-mcp-server

# Proxy mode — transparent interception
"code-keyword">$ "code-function">spidershield proxy "code-keyword">--policy strict -- python my_mcp_server.py

Installation

PyPI

pip install spidershield

pipx (CLI only)

pipx install spidershield

From source

git clone && pip install -e .