Skip to main content
MCP Security • Tool Call Monitoring • Permission Policies

Secure Your AI Agents
Build Safely, Deploy Confidently

The AI Security Layer for autonomous agents: monitor every tool call, enforce granular permissions, detect prompt injection, and maintain tamper-evident audit trails. Part of our unified platform with API security, AI gateway, and verification engine.

Claude Desktop Compatible
LangChain Integration
10K Requests/Month Free
7-step
security pipeline per tools/call
86
MCP API routes across 8 sub-routers
8
MCP-specific database tables
SHA-256
tool definition hash registry (rug-pull)
OS-level
sandbox: rlimits + caps + setsid
Hash-chain
tamper-evident audit (SOC 2 / HIPAA / FedRAMP)

AI Agent Threats We Prevent

Autonomous agents face unique security challenges. G8KEPR protects against all of them.

Direct Prompt Injection

Attackers craft prompts that override system instructions and coerce the agent into unauthorized tool calls. Pattern detection on tool arguments runs at step 5 of the pipeline.

Prevention: 5-tier detection: regex → embeddings → NLI → LLM → behavioral

Indirect Injection (Tool Output)

A retrieved document or API response contains instructions targeting the LLM. IndirectInjectionScanner runs on every tool response before it reaches the agent context.

Prevention: Step 7 response scan • MCP_RESPONSE_SCAN_ENABLED gate

Tool Definition Rug-Pull

A previously-approved tool quietly mutates its description mid-session to weaponize behavior. SHA-256 hashes are pinned at tools/list and verified on every tools/call.

Prevention: MCPRugPullDetectedError → CRITICAL alert → block

Unauthorized Tool Calls

Agent tries to invoke a tool, path, or argument outside its permission scope. Per-tool RBAC, MFA gates for sensitive tools, and parameter-level constraints enforce least privilege.

Prevention: ToolPermissionService → mcp_permissions

Sandbox Escape

Subprocess tool tries to fork, signal the host, or exfiltrate via shell. OS-level sandbox combines rlimits, setsid() process-group isolation, capability dropping, and shell removal.

Prevention: modules/mcp/sandbox/executor.py — 934 LOC

Coordinated Multi-Session Attack

Tool calls from multiple sessions individually score below threshold but jointly cross it. Cross-session correlation analyzer ties activity across users, IPs, and 24-hour windows.

Prevention: MCPCorrelationAnalyzer — alert at score > 50

Every Tool Call Passes 7 Sequential Checks

Zero code changes to the agent or MCP server. Sub-5ms gateway proxy overhead on cached, single-region paths.

1
Permission check
RBAC: does this user/role have access to this tool?
2
MFA verification
TOTP required for sensitive tools (MCPMFAService)
3
Rate limiting
Sliding-window check, Redis-backed with in-memory fallback
4
Rug-pull verification
SHA-256 of tool definition vs. registered hash — block on drift
5
Threat detection
Scan tool arguments for injection patterns
6
Server forwarding
Execute via stdio subprocess, HTTP, or WebSocket transport
7
Response scanning
IndirectInjectionScanner blocks LLM-directed instructions in output
Audit log written
Hash-chain entry: arguments, response, decision, correlation ID
Fail-closed quota state on Redis error • Per-key asyncio lock prevents TOCTOU races • 10 dedicated Prometheus metrics

Four Platforms for AI Agent Security

API Security + MCP Security + AI Gateway + Verification Engine — unified protection for autonomous agents

MCP Security

Primary for AI Agents

Every MCP tool call passes through G8KEPR's security layer. Validate permissions, check arguments, detect anomalies, and log everything before execution.

  • Real-time permission validation
  • Argument type checking and sanitization
  • Anomaly detection (unusual patterns)
  • Complete audit trail for compliance

API Security

Agent Endpoints

Protect the APIs your agents call. Rate limiting, JWT auth, threat detection, and WAF protection for all external API interactions.

  • Agent-specific rate limiting
  • JWT auth per agent identity
  • 1,700+ threat detection patterns
  • Request/response validation

AI Gateway

LLM Routing

Route your agent's LLM calls through multiple providers. Automatic failover, cost tracking, and provider-agnostic integration.

  • Claude, GPT-4, Gemini routing
  • Adaptive Z-score circuit breaker + automatic failover
  • Per-agent cost tracking
  • Prompt caching & optimization

Verification Engine

Agent Output Validation

Constraint, grounding, structural, and integrity checks on every agent output. Real-time enforcement with staged rollout; BLOCK-capable on selected critical paths.

  • Output constraints (forbidden phrases, format, length, PII masking)
  • Source grounding (citation verification, hallucination detection)
  • Structural validation (JSON schema, regex, expected structure)
  • Conversation coherence + drift detection

5 Capabilities You Won't Find Anywhere Else

Not in Anthropic's MCP spec. Not in API gateways. Not in WAFs. Platform-level additions built for autonomous agents.

01

OS-Level MCP Sandbox

Subprocess MCP tools execute inside a hardened Linux sandbox. RLIMIT_CPU/AS/NOFILE/NPROC, setsid() process-group isolation, Linux capability dropping via prctl(), per-tool egress filtering, two-stage SIGTERM→SIGKILL, and shell binaries removed.

modules/mcp/sandbox/executor.py — 934 LOC
02

Tool Definition Hash Registry

SHA-256 hash of every tool definition pinned at tools/list. On every tools/call, the cached definition is re-hashed and compared. Drift raises MCPRugPullDetectedError, blocks execution, and publishes a CRITICAL event to ThreatEventBus.

modules/mcp/tool_registry.py • Redis-backed
03

Adaptive Z-Score Circuit Breaker

Statistical, not threshold-based. Z-score > 3.0 against per-hour time-of-day baselines. 4 overlapping sliding windows (1m/5m/15m/1h). Anomaly classification (spike/degradation/sustained) and progressive recovery (10→25→50→100%).

gateway/ — 2,208 LOC combined
04

Cross-Pillar Correlation

Every event linked across all four pillars via a shared correlation ID. One query answers: "Show me everything that happened from request X across MCP + API + Gateway + Verification, in order." Architecturally impossible when the layers are separate products.

mcp_contexts • parent-child causal chain
05

Hash-Chain Audit System

SHA-256 genesis block, each entry signing the previous. Three verification levels (full chain / single entry / last-N). Tamper-evident. Supports control evidence for SOC 2 Type II CC7.2, HIPAA §164.312(b), and FedRAMP AU-9.

7 modules • 3,866 LOC combined
+

MCP Correlation Analyzer

Cross-session attack detection: 6-dimension risk score (max 110) across tool sensitivity, data volume, burst, denials, prior detections, and tool diversity. Catches coordinated multi-user attacks and 24h slow-and-low patterns.

MCPCorrelationAnalyzer — alert at score > 50

One Correlation ID. All Four Pillars.

A prompt-injection attempt traces forward to the tool call it triggered, the API response that returned, and the verification check that caught it.

User
Session
Prompt
Agent
Tool Call
API Endpoint
Response
Verification
Recorded in mcp_contexts for parent-child replay • Causal chain reconstruction in one query • Hash-chain entries are tamper-evident

Granular Permission Policies

Define exactly what each agent can do. Create policies per agent, per tool, or per environment. Enforce least-privilege access automatically.

  • Role-Based Access Control

    Assign roles to agents with predefined permission sets

  • Per-Tool Permissions

    Control exactly which tools each agent can access

  • Environment Isolation

    Different policies for dev, staging, and production

  • Policy Version Control

    Track changes, rollback policies, maintain audit history

policy.jsonExample Policy
{
  "agent": "research-assistant",
  "version": "1.0",
  "rules": [
    {
      "tool": "read_file",
      "allow": true,
      "paths": ["/data/*", "/reports/*"]
    },
    {
      "tool": "write_file",
      "allow": true,
      "paths": ["/output/*"],
      "maxSize": "10MB"
    },
    {
      "tool": "execute_code",
      "allow": false,
      "reason": "Not permitted for this agent"
    },
    {
      "tool": "api_request",
      "allow": true,
      "domains": ["api.example.com"],
      "rateLimit": "100/hour"
    }
  ],
  "audit": {
    "logAll": true,
    "alertOnDeny": true
  }
}

Works With Your Agent Stack

G8KEPR integrates seamlessly with popular AI agent frameworks and MCP servers

Claude Desktop

Secure MCP servers used with Claude Desktop. Monitor tool calls and enforce permissions.

View Integration →

LangChain

Add security to LangChain agents. Intercept tool calls and validate permissions automatically.

View Integration →

Custom Agents

Build custom agents with our SDK. Full MCP security support for any agent architecture.

View SDK Docs →

Simple Integration

Add MCP security to your AI agents in minutes

Python
Works with all MCP servers
from g8kepr import G8KEPR
from mcp import MCPServer

# Wrap your MCP server with G8KEPR security
server = MCPServer(tools=[read_file, write_file, api_request])
secure_server = G8KEPR(
    server,
    api_key="your-api-key",
    policies="agents/research-assistant.json"
)

# All tool calls are now secured automatically
# - Permissions validated before execution
# - Arguments sanitized and type-checked
# - Full audit trail maintained
secure_server.start()

AI Agent Use Cases

Secure any type of autonomous agent

Code Assistants

Secure agents that read/write files, execute code, and interact with git. Prevent unauthorized file access and code execution.

Tools secured: read_file, write_file, execute, git

Research Agents

Protect agents that search the web, query databases, and aggregate data. Control which sources they can access.

Tools secured: web_search, sql_query, api_request

Customer Support Bots

Secure agents that access CRM, send emails, and process refunds. Prevent unauthorized customer data access.

Tools secured: crm_lookup, send_email, process_refund

Audit Evidence, Built In From Day One

Every MCP tool call appended to a hash-chain audit log. Pre-built mappings to 11 compliance frameworks.

SOC 2-Ready
CC7.2 hash-chain
HIPAA-Ready
§164.312(b) audit
GDPR-Ready
Articles 15–22
EU AI Act
controls implemented
ISO 27001
aligned
FedRAMP
AU-9 evidence

"-Ready" / "aligned" / "controls implemented" reflect capability posture, not third-party attestation. SOC 2 Type II, HIPAA, ISO 27001 certifications pending external audit.

Start Securing Your AI Agents

10,000 requests per month free. Scale with paid plans starting at $299/mo.

14-day free trial
No credit card required
10K requests/mo free