mcp-sentry
# ðĄïļ MCP-Sentry v3.0 â Self-Evolving Security Gateway, Time-Machine Rollback & USD Budget Crusher for MCP
> **Zero external dependencies. Sub-millisecond latency (0.031 ms avg). Bidirectional JSON-RPC 2.0 firewall, 1-click Time-Machine file rollback, real-time USD Token Diet compressor, and Self-Evolving Behavioral Immunity for Claude Code, Cursor, Windsurf & Enterprise MCP fleets.**
[](https://github.com/yepinggu66/mcp-sentry/releases)
[-blue.svg)](#quick-start)
[](#24-vector-red-team-benchmark)
[](#community-vs-pro-49-vs-full-ip-buyout-30000)
[](https://glama.ai/mcp/servers/yepinggu66/mcp-sentry)
> **ðĒ Important Notice (v2.0 vs. v3.0 Evolution):** `MCP-Sentry v2.0.0` was almost completely free. With the major evolutionary leap in **`MCP-Sentry v3.0.0`** (1-Click Time-Machine File Rollback, Smart USD Token Diet, Self-Evolving Behavioral Immunity & Signed SOC2 Compliance Dossiers), **all evolutionary production features are strictly commercial and require a paid Pro License ($49) or the $30,000 Full IP & Master Keygen Buyout.**
---
## ð What's New in v3.0 (Why Developers & Enterprises Upgrade)
1. **⊠ShadowVault Time-Machine (`mcp-sentry rollback`)**
- Automatically captures 0.1ms content-addressed delta snapshots before any mutating MCP tool (`write_file`, `edit_file`, `delete_file`, `patch`) modifies your codebase.
- Did an AI agent hallucinate, corrupt 6 files, or break an uncommitted workspace? Run `mcp-sentry rollback` (or click **⊠1-Click Time-Machine Rollback** in the Live Web UI) to restore every file to its exact pre-agent byte state in 1 second!
2. **ð° Real-Time USD Budget Crusher & Smart Payload Diet (`TokenDietEngine`)**
- Calculates real-time token & USD burn across both requests and bloated MCP responses (`max_session_usd: 5.00`).
- **Smart Payload Diet**: Automatically trims massive 100KB+ JSON/log dumps from MCP tools down to high-signal head+tail context before they enter your LLM window â **saving 50%â80% on daily Claude / OpenAI API bills**.
3. **ð§Ž Self-Evolving Behavioral Immunity (`AdaptiveImmunityEngine`)**
- Every time an attack is blocked or an operator clicks **DENY** on the Human-in-the-Loop dashboard, MCP-Sentry extracts the AST/payload skeleton and synthesizes a new **Immunity Gene (`GENE-XXXXXXXX`)**, automatically immunizing your gateway against mutated follow-up attempts.
4. **ðŠĪ Active Canary Honeypot Trap (`CanaryHoneypot`)**
- Mints watermarked decoy credentials (`sk-proj-SENTRYCANARY...`, `AKIASENTRY...`) to bait untrusted MCP servers. Any outbound tool attempting to exfiltrate a canary token is caught with **0% false positives** and permanently quarantined.
5. **ð Cryptographic SOC2 / EU AI Act Compliance Dossier Exporter (`mcp-sentry audit --export-soc2 report.html`)**
- Exports a self-contained, SHA-256 hash-chained & HMAC-signed HTML compliance report for security audits.
---
## ð Community vs. Pro ($49) vs. Full IP Buyout ($30,000)
| Capability | Community (Free Eval) | ⥠Developer Pro ($49 One-Time) | ðïļ Enterprise / Full IP Buyout ($30,000) |
| :--- | :---: | :---: | :---: |
| 24-Vector OWASP MCP Threat Firewall (`stdio` + `HTTP`) | â
Unlimited | â
Unlimited | â
Unlimited + White-Label IP |
| **⊠ShadowVault Time-Machine File Rollback** | 1 file / session (Eval) | **â
Unlimited Files & Sessions** | **â
Unlimited + Fleet Sync** |
| **ð° Smart Payload Diet (Saves 50%â80% API USD)** | 3 compressions / session | **â
Unlimited Auto-Diet & USD Cap** | **â
Unlimited + Cost Telemetry** |
| **ð§Ž Self-Evolving Behavioral Immunity Genome** | 3 in-memory genes / session | **â
Persistent Genome + 65-Rule Enterprise Pack** | **â
Master Genome Vault + Signer** |
| **ð SOC2 / EU AI Act HTML Audit Certificate** | Watermarked (`[EVAL]`) | **â
Official Signed Commercial Seal** | **â
Custom Branded Compliance Seal** |
| **Commercial SaaS Redistribution & Master Keygen** | â Prohibited | Single-Org Production Use | **â
100% Exclusive IP & Master Keygen** |
- ð **Unlock Developer Pro ($49 One-Time â Pays for itself in 1 week of saved Claude API tokens)**: [Instant PayPal Checkout](https://www.paypal.com/ncp/payment/7G6M6X7889A2Q)
- ð **Acquire Full Turnkey IP & Master Keygen Vault ($30,000)**: [AgentWall M&A Sandbox & Console](https://pingguye.cn/stackverdict/agentwall) or email **yepinggu6@gmail.com**
---
## Quick Start
### 1. Install
```bash
git clone https://github.com/yepinggu66/mcp-sentry.git
cd mcp-sentry
pip install -e .
```
### 2. Check Evolutionary Status & Run 24-Vector Benchmark
```bash
mcp-sentry status
mcp-sentry bench
```
### 3. Wrap Any MCP Server in Cursor / Claude Desktop (`mcp.json`)
```json
{
"mcpServers": {
"filesystem-guarded": {
"command": "mcp-sentry",
"args": ["wrap", "--policy", "sentry.yaml", "--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}
```
### 4. Instant Time-Machine Rollback When an AI Agent Breaks Your Code
```bash
mcp-sentry rollback
```
### 5. Run HTTP Reverse Proxy + Live Firewall, Time-Machine & HITL Console
```bash
mcp-sentry init
mcp-sentry proxy --upstream http://127.0.0.1:9000/mcp --port 8787 --policy sentry.yaml
# Open http://127.0.0.1:8787/sentry/ui
```
### 6. Activate Your Pro / Enterprise License Key & Export Signed SOC2 Report
```bash
mcp-sentry activate SENTRY-V3-PRO-PERPETUAL-YOURNAME-XXXXXXXXXXXXXXXX
mcp-sentry audit --verify --export-soc2 soc2_compliance_certificate.html
```
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: payload threat auditing, ShadowVault snapshot/modification querying, and runtime policy/status inspection. The slight mention of ShadowVault status inside sentry_status does not meaningfully blur its boundary with sentry_shadowvault_query.
All tools share the sentry_ prefix and snake_case formatting, which helps readability. However, the suffixes mix patterns: verb_noun in audit_payload, entity_action in shadowvault_query, and a bare noun in status.
Three tools map cleanly to the server's core capabilities: audit, query, and status. The set is tightly scoped with no redundant or filler tools.
The server supports detection/audit, forensic querying, and status inspection, but it lacks tools for configuring policies, managing the budget limiter, or restoring/remediating snapshot changes. Agents can observe and audit but cannot act on findings, leaving notable lifecycle gaps.