Scan your whole stack
Latest version: v0.2.0
Aegis-MCP was last scanned on 2 Dec 2026 at version 0.2.0. Risk score 10 of 100 (low). No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.0 LATEST | 2 Dec 2026 | 1 rule fired |
Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
An encoded string in the package decodes, without being run, to a shell command, a network call, a code-execution call or an instruction aimed at an AI agent. The content was hidden from a plain read of the code. Encoding has legitimate uses, so the decoded content needs review.
MEDIUMThe score describes 0.2.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A lightweight, cloud-native Zero-Trust Firewall, DLP Redactor & Cryptographic Audit Proxy for Model Context Protocol (MCP) servers, built with Python 3.12, FastAPI, Pydantic v2, SQLite, and uv.
Aegis-MCP sits between AI Agents (Claude Desktop, Cursor, autonomous orchestrators) and downstream MCP servers, inspecting every tools/call invocation in real time to block Indirect Prompt Injection, Destructive SQL/Shell Execution, and Path Traversal, while automatically scrubbing PII & Secrets and recording every decision in a tamper-evident SHA-256 hash-chained SQLite ledger.
flowchart LR
host["MCP Host<br/>(Claude Desktop, Cursor, agents)"]
subgraph gateway["Aegis-MCP Gateway"]
direction LR
auth["Auth / RBAC / ABAC"]
canon["Canonicalize"]
threat["Threat Rules & Taint"]
dlp["DLP"]
ledger["SHA-256 Ledger & Merkle"]
auth --> canon --> threat --> dlp --> ledger
end
upstream["Upstream MCP Servers"]
host -->|"tools/call, resources/read, prompts/get"| auth
ledger -->|"ALLOWED / SANITIZED"| upstream
upstream -->|"toolguard-screened, DLP-redacted replies"| host
Every request from an MCP host passes through the gateway pipeline in order: identity and policy checks (app/auth.py, app/policy.py, app/constraints.py), anti-evasion canonicalization (app/normalize.py), threat rules and toxic-flow taint tracking (app/firewall.py, app/taint.py), DLP redaction (app/redactor.py), and the hash-chained audit ledger with Merkle checkpoints (app/ledger.py, app/merkle.py). Only allowed or sanitized calls reach the upstream MCP server.
POST /api/v1/mcp/inspect):agent_id, server_name, tool_name, arguments, environment) against deterministic security policies in < 2 ms.app/firewall.py):prompt_injection: Blocks instruction override attempts (ignore previous instructions, system prompt:, <|im_start|>).path_traversal: Blocks unauthorized filesystem escapes (../, /etc/passwd, /etc/shadow, .ssh/id_rsa, .env).destructive_sql: Blocks destructive SQL/DDL payloads (DROP TABLE, TRUNCATE TABLE, DELETE FROM ... WHERE 1=1).command_injection: Blocks shell metacharacter chaining and destructive system commands (rm -rf, ; curl, | bash, `, $()).app/redactor.py):sk-..., ghp_..., AKIA...) and Bearer tokens $\rightarrow$ [REDACTED_SECRET].[REDACTED_EMAIL].[REDACTED_IBAN].GET /api/v1/audit & GET /api/v1/audit/verify):ALLOWED, SANITIZED, BLOCKED) is persisted in an embedded SQLite ledger (sqlite3 stdlib, default /tmp/aegis_mcp.db for readOnlyRootFilesystem: true compatibility).app/ledger.py) computes entry_hash as the SHA-256 of the RFC 8785 (JCS) canonical JSON of the full entry (prev_hash, timestamp, identity/scope, decision, risk score, violations, DLP categories, sanitized-arguments digest, policy version/mode, would_block, MCP session id), forming an immutable chain verifiable via GET /api/v1/audit/verify. Legacy v1 links (SHA256(prev_hash | timestamp | agent_id | server_name | tool_name | decision | risk_score)) are migrated additively and still verified; a v1 link after a v2 link is rejected as a downgrade.app/normalize.py): threat rules and DLP also run on NFKC-normalized, zero-width/bidi-stripped (CVE-2021-42574), tag-revealed, homoglyph-folded, percent/HTML-decoded and bounded recursive Base64/hex-decoded views; matches only visible after decoding add obfuscated_payload.GET /metrics) & Perimeter Auth (X-API-Key):aegis_mcp_requests_total, aegis_mcp_blocked_total, aegis_mcp_redactions_total, aegis_mcp_ledger_errors_total, and the aegis_mcp_inspection_duration_seconds SLO histogram (1 ms–500 ms buckets around the 10 ms p99 objective). Label values are sanitized and capped at 64 per label (overflow → other); no agent_id/session_id labels.app/telemetry.py) over OTLP/HTTP with GenAI/MCP semantic conventions (gen_ai.system, mcp.server.name, mcp.tool.name, mcp.method.name, aegis.decision, aegis.risk_score, pseudonymized aegis.session.id) for the HTTP server span, the JSON-RPC proxy, /mcp Streamable HTTP and MCPFirewall.inspect; W3C traceparent is honored.trace_id, span_id, request_id (X-Request-Id), decision and risk_score; Grafana dashboard deploy/grafana/aegis-mcp.json and PrometheusRule alerts deploy/prometheus/aegis-mcp-rules.yaml (p99 > 10 ms, toxic-flow / tool-drift spikes, chain/checkpoint errors).Dockerfile running under UID 10001 (appuser) with Kubernetes manifests (k8s/) and OPA/Rego policies (policy/).docs/THREAT-MODEL.md: STRIDE analysis for every trust boundary (MCP client, gateway transports, upstream servers, audit ledger and Ed25519 checkpoints, operators, webhooks/OTLP), a residual risk register, and a control matrix against the OWASP LLM Top 10 2025, OWASP Agentic AI Threats, MITRE ATLAS, NIST AI RMF, the EU AI Act (Art. 12 & 14) and ISO/IEC 42001.SECURITY.md: supported versions, private vulnerability disclosure (GitHub Security Advisories), response targets, and how to verify releases (cosign, SLSA) and the audit ledger (scripts/verify_ledger.py).| Layer | Technology |
|---|---|
| Language & runtime | Python 3.12, managed with uv (uv.lock, uv_build) |
| Web framework | FastAPI on Uvicorn (ASGI) |
| Data validation & settings | Pydantic v2, pydantic-settings |
| Upstream transports | httpx (JSON-RPC 2.0, MCP Streamable HTTP / SSE) and the stdio wrapper (app/stdio_wrap.py) |
| Identity & cryptography | PyJWT, cryptography (Ed25519 checkpoints), SHA-256, RFC 8785 (JCS) canonical JSON |
| Policy | YAML RBAC/ABAC documents (pyyaml) and OPA/Rego admission policies (policy/) |
| Audit storage | SQLite (sqlite3 stdlib, WAL mode) |
| Observability | Prometheus text exposition, OpenTelemetry OTLP/HTTP, structured JSON logs |
| Quality tooling | pytest, pytest-cov, mypy (strict), ruff, black, isort, bandit, pip-audit, radon, xenon, atheris, mutmut, k6 |
| Delivery | Multi-stage Dockerfile, Kubernetes manifests (k8s/), Grafana and Prometheus assets (deploy/) |
Install the free, official Aegis-MCP skill from Agensi.io to let your coding agent wire app.stdio_wrap, generate RBAC/ABAC/taint YAML policies (dev-monitor.yaml / prod-strict.yaml), run tool-poisoning scans, and verify the audit ledger automatically.
make install # uv sync --frozen
make dev # uv run uvicorn app.main:app --reload --port 8000
make test # pytest with coverage (--cov-fail-under=85)
make check # full gate: lock, format, lint, types, SAST, deps, complexity, coverage, fuzz, detection, latency, red-team
make redteam # promptfoo adversarial red-team against the gateway (Node.js 22 / npx)
make docker # docker build -t aegis-mcp:latest .
# Option A: Run locally with uv
uv run uvicorn app.main:app --reload --port 8000
# Option B: Run MCP security & DLP traffic simulation
uv run python -m scripts.simulate_mcp_traffic --dry-run
# Option C: Build and run hardened production container
docker build -t aegis-mcp:latest .
docker run --rm -p 8000:8000 aegis-mcp:latest
stdio MCP servers (Claude Desktop / Cursor / Windsurf)app.stdio_wrap sits between a local MCP host and any stdio MCP server subprocess:
uv run python -m app.stdio_wrap [--server-name NAME] [--agent-id AGENT] \
[--environment dev|staging|prod] [--policy PATH] [--db-path PATH] -- <command> [args...]
Replace the server's command/args in your host's mcpServers config with the wrapper (use absolute paths; --directory points uv at this checkout):
{
"mcpServers": {
"filesystem": {
"command": "uv",
"args": [
"run", "--directory", "/opt/aegis-mcp", "python", "-m", "app.stdio_wrap",
"--server-name", "filesystem-mcp", "--agent-id", "cursor",
"--policy", "/opt/aegis-mcp/policy/local.yaml",
"--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/srv/workspace"
]
},
"postgres": {
"command": "uv",
"args": [
"run", "--directory", "/opt/aegis-mcp", "python", "-m", "app.stdio_wrap",
"--server-name", "postgres-mcp", "--environment", "prod",
"--policy", "/opt/aegis-mcp/policy/local.yaml",
"--", "npx", "-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/app"
]
}
}
}
stdin/stdout (lines capped at 1 MiB from the host and 5 MiB from the server); the server's stderr and wrapper diagnostics go to stderr only.tools/call, resources/read and prompts/get run the full MCPFirewall.inspect pipeline (threat rules, RBAC, tool_constraints, toolguard drift/poisoning, toxic-flow taint, DLP, ledger). Blocked calls are never forwarded and are answered with -32003 (violations, audit_hash). Discovery requests, notifications/* and client responses are DLP-redacted; other methods get -32601, client batches -32600.initialize pinning, */list TOFU pinning, drift hiding, poisoning hiding, RBAC least-privilege tools/list), DLP-redacted (a redaction promotes the session to private_data taint), and reserved codes -32003/-32004 are rewritten to -32000. Server-initiated messages are DLP-redacted; unsolicited responses are dropped.stdio-<32 hex> session id per wrapper lifetime binds taint tracking and ledger v2 entries across every call.AEGIS_* variable (e.g. AEGIS_API_KEY, AEGIS_DLP_HMAC_KEY) is stripped from the server's environment; the server is spawned with shell=False.plugins/aegis-mcp/ is a self-contained, publishable plugin bundle: a plugin.json manifest, logo, mcp_config.json stdio-wrapper template, and ready-to-use dev-monitor / prod-strict example policies. See the plugin README for installation and wiring, and the agent skill for the install, govern, and verify workflow.
AEGIS_*)Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.