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 keep an append-only audit trail. 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
stdio MCP servers: rlimits + caps + setsid
Append-only
audit log (mapped to 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: Multi-tier detection: inline regex + ML classifier, with optional deeper tiers

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-bomb, signal the host, or spawn a shell. Stdio MCP servers the proxy launches get OS-level limits: rlimits, setsid() process-group isolation, best-effort no-new-privileges, and no shell.

Prevention: modules/mcp/interceptor_transport.py

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. Target: 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
Audit record: 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)
  • Per-call audit record for compliance evidence

API Security

Agent Endpoints

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

  • Rate limiting per organization, user and IP
  • JWT auth per agent identity
  • ML detector · 94,000+ training samples
  • 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 Limits on MCP Servers

Stdio MCP servers launched by the proxy run under hardened process limits: RLIMIT_NPROC/NOFILE/AS/FSIZE (the launch aborts if one can't be set), setsid() process-group isolation, a best-effort no-new-privileges and ambient-capability clear via prctl() on Linux, a scrubbed environment, and no shell: only allowlisted interpreters, with inline-code flags rejected. Network egress is not restricted.

modules/mcp/interceptor_transport.py
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

Findings from all four pillars land on one threat-event bus. A compound correlator groups them in 5-minute windows by correlation ID and by organization + client IP, and raises one incident when they match a known multi-stage pattern: a prompt injection at the gateway plus an SSRF probe and a path traversal at the API from the same client become a single critical Lethal Trifecta finding.

modules/compound_correlator • findings.mcp_security.compound
05

Append-Only Audit Log

HMAC-SHA256 hash chain on authentication and domain events (since 2026-09-13), each entry signing the previous. Three verification levels (full chain / single entry / last-N). Mapped to SOC 2 Type II CC7.2, HIPAA §164.312(b), and FedRAMP AU-9 (a control mapping, not an attestation).

modules/compliance/audit_chain.py
+

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 Finding Bus. All Four Pillars.

Every pillar publishes its findings to one threat event bus. The compound correlator joins findings on the same request by correlation ID, and separate requests from one client by organization + client IP.

User
Session
Prompt
Agent
Tool Call
API Endpoint
Response
Verification
Every tool call is written to mcp_tool_calls with its correlation ID • Compound findings link every contributing finding

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 written to the append-only audit log. Pre-built mappings to 12 compliance frameworks with automated assessment, plus 8 reference catalogs.

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

"-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 $399/mo.

30-day free trial (extend to 90 days free)
No credit card required
10K requests/mo free