AgentSentinel MCP Gateway
Acts as an execution firewall and reliability gateway for CrewAI agents, providing safe tool invocations with command sanitization, path containment, rate limiting, circuit breaking, and DLP redaction.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AgentSentinel MCP Gateway run `git status` in the repo and summarize changes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π‘οΈ AgentSentinel MCP Gateway
Industrial-Grade Zero-Trust MCP Gateway, DLP Secret Firewall & Circuit Breaker for Autonomous AI Agents
AgentSentinel is an enterprise-grade execution firewall and reliability gateway sitting between AI Agent clients (Claude Desktop, Claude Code, Cursor, Antigravity, OpenCode, AutoGen, CrewAI) and host capabilities. It solves the three most critical operational barriers facing autonomous agents in production.
π― The Three Core Pillars
[ Autonomous AI Agent / LLM Client ]
(Claude, Cursor, Antigravity, OpenCode)
β
β JSON-RPC 2.0 (stdio)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AGENTSENTINEL GATEWAY β
β β
β 1. β‘ RELIABILITY & CIRCUIT BREAKER β
β - Sliding-window rate limiter (60 RPM) β
β - Runaway failure detector (trips OPEN on 3 consecutive failures) β
β β
β 2. π ZERO-TRUST PRE-EXECUTION FIREWALL β
β - AST Command Sanitizer (blocks chaining ";", "&&", `subshell`) β
β - Chroot Path Guard (rejects "../../" directory traversal) β
β - SSRF Guard (blocks 169.254.169.254 metadata & private subnets) β
β β
β 3. π DATA LOSS PREVENTION (DLP) SECRET MASKING β
β - Scans inputs and outputs for 25+ secret patterns β
β - Redacts AWS, GitHub, OpenAI, Claude, JWT, DB URIs before LLM β
β β
β 4. π STRUCTURED AUDIT LEDGER β
β - Append-only JSONL log with duration, verdict & hash β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
[ Sandboxed Host Execution ]1. π Zero-Trust Pre-Execution Gateway & DLP Engine
Command Injection Defense: Intercepts shell execution before it reaches the OS. Blocks command chaining (
;,&&,||,|), subshell execution (`...`,$(...)), and denylisted destructive binaries (rm,del,format,dd,mkfs,curl | sh).Path Traversal Containment: Canonical path resolution strictly chroots execution within the approved workspace root directory.
SSRF Link-Local Protection: Blocks outbound calls to cloud metadata IP (
169.254.169.254), loopbacks (127.0.0.1,localhost,::1), and private RFC-1918 subnets (10.0.0.0/8,172.16.0.0/12,192.168.0.0/16).Automated DLP Redaction: Pre-flight and post-execution token scanner with zero-trust redaction for:
AWS Access Keys (
AKIA...)GitHub Personal Access Tokens (
ghp_...,github_pat_...)Anthropic & OpenAI API Keys (
sk-ant-...,sk-proj-...)RSA & OpenSSH Private Keys (
-----BEGIN RSA PRIVATE KEY-----)JWT Tokens (
eyJ...)Database URI passwords (
postgres://user:password@host...)Slack Tokens & Stripe Secret Keys
2. β‘ Circuit Breakers & Runaway Loop Prevention
Runaway Loop Breaker: When an autonomous agent enters a broken loop (e.g., retrying an erroneous query repeatedly), the circuit breaker transitions from
CLOSEDtoOPENafter $N$ consecutive failures.Token Spend Protection: Rejects all further tool invocations during cooldown, preventing catastrophic API token spend and CPU exhaustion.
Sliding-Window Rate Limiter: Enforces strict requests-per-minute (RPM) limits per session to throttle runaway concurrency.
Self-Healing Recovery: Automatically transitions to
HALF-OPENafter cooldown, allowing probe attempts to restore normal operation.
3. π Local-First, Zero-Heavy-Infra Architecture
Zero Kubernetes or Heavy Cloud Setup: Runs as a lightweight, single-process Node.js daemon directly on your workstation or server.
Native MCP Protocol Compliant: Integrates instantly into Claude Desktop, Claude Code, Cursor, or custom AI agent loops over standard STDIO JSON-RPC 2.0.
Deterministic Structured Audit Ledger: Writes an append-only JSONL audit log capturing caller session, duration, tool name, security verdict, and DLP metrics without external observability dependencies.
Related MCP server: genpark-agent-bash-command-sandbox-guard-skill
π οΈ Provided MCP Tools
Tool Name | Description | Security Controls Applied |
| Executes shell commands safely. | Allowlist, AST chaining block, timeout, DLP output redaction. |
| Sandboxed file ops ( | Path chroot containment, traversal block, secret masking. |
| Secure HTTP client ( | SSRF metadata blocker, header & body DLP redaction. |
| Pre-flight permission validator. | Lets agents query policy verdicts before attempting actions. |
| Query audit trail and circuit telemetry. | Read-only inspection of runtime logs and breaker state. |
π Quickstart & Installation
Option A: Use directly with npx or node
# Clone the repository
git clone https://github.com/opuhassan001-alt/agent-sentinel-mcp.git
cd agent-sentinel-mcp
# Install dependencies and build
npm install
npm run build
# Run the test suite (100% pass)
npm testOption B: Configure with Claude Desktop (claude_desktop_config.json)
Add AgentSentinel to your Claude Desktop configuration:
{
"mcpServers": {
"agent-sentinel": {
"command": "node",
"args": [
"E:/work station/opu-portfolio/agent-sentinel-mcp/dist/index.js"
],
"env": {
"SENTINEL_ROOT_DIR": "E:/work station/opu-portfolio",
"SENTINEL_MAX_FAILURES": "3",
"SENTINEL_RATE_LIMIT_RPM": "60"
}
}
}
}Option C: Configure with Cursor IDE (.cursor/mcp.json)
{
"mcpServers": {
"agent-sentinel": {
"command": "node",
"args": ["dist/index.js"]
}
}
}βοΈ Configuration Reference
AgentSentinel can be configured via environment variables or a configuration object:
Environment Variable | Default | Description |
|
| Root boundary for filesystem operations and working directories. |
|
| Filepath for append-only structured audit records. |
|
| Number of consecutive tool errors before circuit trips OPEN. |
|
| Cooldown duration in milliseconds before half-open retry. |
|
| Maximum tool invocations allowed per minute. |
π§ͺ Testing & Verification
AgentSentinel includes an automated unit & integration test suite using the Node.js native test runner:
npm testβΆ CircuitBreaker & Runaway Loop Protection (6 tests)
βΆ DLP Secret Scanner & Redaction Engine (7 tests)
βΆ PolicyEngine & AuditLogger (5 tests)
βΆ Security Firewall Guards (12 tests)
βΆ Industrial MCP Tools Suite (11 tests)
β All 41 tests passed cleanlyπ³ Docker Deployment
Run AgentSentinel inside a sandboxed container:
docker build -t agent-sentinel-mcp .
docker run -i --rm -v $(pwd):/workspace -e SENTINEL_ROOT_DIR=/workspace agent-sentinel-mcpπ License
Released under the MIT License. Copyright Β© 2026 Estakball Hossain (Opu).
Available Tools
5 toolssentinel_audit_inspectB
Query the immutable structured audit ledger, circuit breaker state, and runtime metrics for compliance inspection.
Inputs: limit.
sentinel_policy_checkB
Pre-flight permission evaluator enabling autonomous agents to check whether an intended action complies with security policy before execution.
Inputs: args (required), tool (required).
sentinel_safe_execA
Execute shell commands inside an AST-inspected security sandbox with command chaining prevention, timeout enforcement, and automated DLP secret redaction.
Inputs: command (required), cwd, timeoutMs.
sentinel_safe_fetchB
Perform HTTP/HTTPS network requests with SSRF protection against cloud metadata IPs (169.254.169.254) and private subnets, plus DLP payload redaction.
Inputs: url (required), body, method, headers, +1 more.
sentinel_safe_fsA
Perform sandboxed filesystem operations (read, write, list, stat) with strict chroot directory containment and zero-trust secret masking.
Inputs: path (required), action (required), content, encoding.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Each tool targets a clearly distinct security capability: shell execution, filesystem operations, network fetching, policy pre-checking, and audit inspection. Although safe_exec could overlap with safe_fs or safe_fetch via shell commands, the sandbox descriptions make the intended boundaries clear.
All tools use snake_case with a consistent sentinel_ prefix, which is highly predictable. The pattern shifts slightly from sentinel_safe_<action> for operational tools to sentinel_<noun>_<verb> for policy and audit tools, but remains readable and coherent.
Five tools is well-scoped for a security gateway, covering execution, filesystem, network, policy, and audit without redundancy. Each tool earns its place in the minimal surface.
The core agent action surfaces are covered, plus policy evaluation and audit inspection. Minor gaps exist: safe_fs lacks explicit delete/remove, and there is no tool to manage policies or reset circuit breakers, but agents can likely work around these limitations.
Related MCP Connectors
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Run AI agent tasks in isolated sandboxes with a cost cap, saved workflows and scoped connections.
Permission checks, human approval cards, and signed audit trails for AI agent tool calls.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables AI agents to safely interact with GitHub, query Postgres read-only, check deployment status, and search/read files within an allowlisted sandboxβall with dry-run writes and SQL/path safety gates.8-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables autonomous agents to run shell and subprocess commands through a guardrail that blocks destructive system mutations, path traversals, and reverse shells. It also adds prompt-injection detection, spend circuit breakers, loop detection, and privacy sanitization so agent execution stays within safe, budgeted bounds.MIT
- AlicenseNot gradedqualityBmaintenanceEnables autonomous agents to enforce financial guardrails by tracking real-time token burn and cost velocity, automatically throttling or freezing execution when budgets are exceeded. It also blocks destructive shell commands, prompt injections, and runaway planning loops while sanitizing outputs before they are returned.7MIT
- AlicenseAqualityBmaintenanceEnables agents to score, inspect, and gate tool calls before they execute, resolving shell commands the way a shell would in order to block destructive actions and detect multi-step attack sequences. It also redacts credentials and PII in either direction, requires signed single-use approval tokens for high-impact actions, and keeps a tamper-evident audit trail.6173 npm5Apache 2.0