Skip to content
Enterprise Beta

FaradAiWire Overview

FaradAiWire Overview 🛡️

FaradAiWire is a lightweight, zero-trust security gateway and Policy Enforcement Point (PEP) specifically engineered to protect AI agents (Claude Code, Cursor, Copilot, custom LLM runners) against Model Context Protocol (MCP) threats, prompt injection, sensitive data leakage, and malicious tools.

graph LR
Agent["AI Agent / IDE Client\n(Claude Code, Cursor, Windsurf)"] -->|"Bearer Token / JSON-RPC\nPort 8090 (Ingress)"| PEP["FaradAiWire Gateway PEP\n(Fail-Closed Ingress)"]
PEP -->|"Adaptive Filter Pipeline\n(Prefill, DLP, Schema, SLM Guard)"| Engine["Security Engine"]
Engine -->|"Sanitized Stdio Subprocess"| StdioMCP["Local Tools\n(filesystem, git, sqlite)"]
Engine -->|"SSRF-Safe HTTP/SSE Dial"| RemoteMCP["Remote MCP Servers\n(API, cloud services)"]
Operator["Security Admin / Browser"] -->|"Web Console & REST API\nPort 8095 (Admin)"| PEP

The Problem: Unchecked Agent Agency

When AI agents execute Model Context Protocol (MCP) tools directly, security boundaries collapse:

  • Indirect Prompt Injection: Untrusted web or document content returned from tools can hijack agent reasoning and force malicious secondary tool calls (e.g. exfiltrating SSH keys or .env secrets).
  • Tool Poisoning & Schema Drift: Malicious or compromised MCP servers can mutate tool definitions between tools/list calls to trick agents into providing privileged arguments.
  • Data Loss & Exfiltration (DLP): Agents freely pass API keys, credit card numbers, database credentials, and national ID tokens in tool payloads.
  • Infinite Tool Loops: Hallucinations or circular reasoning can trigger thousands of repeated API calls, causing denial-of-service and massive token billing spikes.

FaradAiWire acts as an in-line Policy Enforcement Point (PEP), inspecting, sanitizing, and authorizing every JSON-RPC tool interaction with microsecond-level latency.


Core Capabilities

CapabilityExecution LayerLatency SLADescription
Assistant Prefill GuardFast Path (In-Memory)< 0.1 msNeutralizes sockpuppeting and conversational prefill hijacking attempts.
Runtime JSON Schema PinningFast Path (In-Memory)< 0.3 msPins first-seen tool schemas and alerts or blocks runtime schema drift and tool poisoning.
Data Loss Prevention (DLP)Fast Path (Regex Engine)< 0.5 msIdentifies credentials, private keys, and PII; applies block or grammatical mask redaction.
Loop & Rate ProtectionFast Path (Sliding Window)< 0.1 msToken-bucket rate limiting and consecutive duplicate tool call detection (max_repeat).
Neural Prompt Injection GuardDeep Path (Local SLM)15–40 msOptional semantic scoring via local Small Language Models (Qwen3Guard, Prompt-Guard, Granite).
Human-In-The-Loop (HITL)Intercept LayerInteractiveHalts destructive tool actions (write_to_db, send_email) for CLI or webhook operator confirmation.
Tamper-Evident TelemetryAsync LoggerNon-blockingStructured JSONL audit logging and embedded DuckDB analytics with zero remote telemetry egress.

Architecture Principles

1. Physical Port Segregation

FaradAiWire enforces strict port segregation:

  • Port 8090 (Proxy Ingress): Dedicated to high-throughput agent tool traffic. Operates in fail-closed mode requiring Authorization: Bearer <API_KEY>.
  • Port 8095 (Admin Console): Dedicated to system administration, runtime metrics, Web Console, and configuration inspection. Bound to loopback (127.0.0.1) by default.

2. Single-Tenant Native Host Daemon (ADR-0051)

FaradAiWire is distributed as a host-native Go binary. Because over 95% of MCP tools operate via local stdio subprocesses (npx, python, git), running FaradAiWire directly on the workstation preserves host tool paths, host credentials, and operating system performance without container virtualization overhead.

3. Open Core Purity (ADR-0050)

The open-source FaradAiWire Core binary is 100% offline-first and contains zero external cloud dependencies. Enterprise multi-tenant governance, Open Policy Agent (OPA) compiler engines, and centralized fleet control planes are strictly segregated into FaradAiLab Enterprise Edition.


Quick Navigation

  • ⚡ Quickstart Guide: Launch the gateway and run your first verified tool call in under 5 minutes.
  • 📦 Installation: Homebrew, curl shell installer, PowerShell, or building from source.
  • 🤖 Agent Integration: Connect Claude Code, Cursor, Windsurf, or custom LLM runners.
  • 🛡️ Security Filters: Configure DLP, Neural Prompt Guard, and Schema Validation.
  • 📖 CLI Reference: Master faradaiwire run, doctor, audit, and guard.