# AperionAI/shield [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/AperionAI/shield  
**GitHub Stars:** 13  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/aperionai-shield

## Description
Local guardrail proxy for AI coding agents. Wraps any MCP server (stdio or Streamable HTTP) and blocks destructive tool calls — DROP TABLE, rm -rf, force-push — before they execute. MCP supply-chain protection: TOFU tool-catalog pinning against rug pulls, plus tool-description and tool-result scanning for tool poisoning and prompt injection. 51 starter rules, approval gates, audit logging. Single binary, Apache-2.0.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "shield": {
    "command": "npx",
    "args": ["-y","@modelcontextprotocol/server-postgres"]
  }
}
```

## Documentation

## What AperionAI/shield does

AperionAI/shield is a local policy enforcement layer for AI coding agents. It sits between an agent and the MCP servers that provide access to databases, Git hosting, shells, filesystems, and other systems. The proxy handles local stdio servers and remote MCP servers exposed through Streamable HTTP.

The main decision point is an MCP `tools/call` request. Shield checks the requested operation against safety rules and can deny it before the downstream server receives the call, pause for human approval, or permit it with a warning. Its rule coverage includes destructive SQL, Git operations, filesystem changes, credential access, reverse shells, privilege escalation, cloud and Kubernetes administration, Docker, IAM, anti-forensics, NoSQL and search systems, host-security controls, and Windows or PowerShell activity.

## How it works

Shield also examines traffic in the opposite direction. On first observation, it can record a tool catalog as a trusted baseline and identify later changes that may indicate a supply-chain replacement. Tool descriptions are checked for poisoning patterns, while returned tool data is inspected for prompt injection.

The binary can additionally audit an MCP server before it is connected with `--scan`, and isolate the server process at the operating-system level with `--sandbox`. Secret cloaking lets an agent refer to configured credentials through `{{cloak:NAME}}`; Shield substitutes the value only when forwarding a request and removes it from returned data so the secret is not placed in the model context.

For supported agent hooks, Shield can enforce decisions before and after tool activity. Post-tool checks can record credential-shaped data and use that state to ask before a later network transfer. Rules also cover attempts by an agent to modify Shield's hooks or disable its protections.

## Setup and configuration

Shield is distributed as a single binary. The project documents installation through a shell command and also publishes a container image. It requires Rust 1.75 or newer when building from source.

The agent-hook installation command configures supported pre- and post-tool events. A separate guard process watches hook configuration, MCP configuration, and agent rule files; it can restore a removed Shield hook and notify the user. User-level launchd or systemd units can be installed for continuous watching, or the guard can run once.

Policy can be adjusted through shieldset configuration. Examples include setting a minimum file size for the optional large-read offload rule and defining allowed egress hosts. The Smartflow control-plane mode can distribute organization policy and send audit data upstream while using an existing identity provider.

## Tools and capabilities

- Intercept MCP calls over stdio and Streamable HTTP.
- Apply safety rules with block, approval, or warning outcomes.
- Pin tool catalogs and scan descriptions and results.
- Pre-scan MCP servers and sandbox their processes.
- Cloak configured secrets at the forwarding boundary.
- Install and monitor agent hooks, including IDE-specific events.
- Record approvals and security-relevant audit activity.

## Limitations and notes

Shield is intended for local enforcement around AI coding agents; its behavior depends on the policy rules, hook events, and downstream MCP transport being configured correctly. Some host events can request a decision before execution but cannot reject an already completed post-tool action, so post-event checks use session state to influence subsequent calls. The project lists support for Cursor, Claude Code, Cline, Continue, Windsurf, and Zed.

The repository license badge identifies the project as Elastic License 2.0.

_Full upstream README: https://allmcps.com/mcp/aperionai-shield/readme_

