# Aperion Shield MCP server

> Acts as a local guardrail proxy that blocks destructive tool calls, tool poisoning, and secret exfiltration for AI coding agents.

- Repository: https://github.com/AperionAI/shield
- Page: https://hostedmcp.org/servers/aperionai/shield
- Transport: stdio
- Stars: 13
- Latest version: 1.0.1

## Install

### Claude Code

```sh
claude mcp add shield -- docker run -i --rm ghcr.io/aperionai/shield:shield-v1.0.1
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "shield": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aperionai/shield:shield-v1.0.1"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "shield": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aperionai/shield:shield-v1.0.1"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"shield","type":"stdio","command":"docker","args":["run","-i","--rm","ghcr.io/aperionai/shield:shield-v1.0.1"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "shield": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aperionai/shield:shield-v1.0.1"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add shield -- docker run -i --rm ghcr.io/aperionai/shield:shield-v1.0.1
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.shield]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/aperionai/shield:shield-v1.0.1"]
```

### Gemini CLI

```sh
gemini mcp add -s user shield docker -- run -i --rm ghcr.io/aperionai/shield:shield-v1.0.1
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "shield": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/aperionai/shield:shield-v1.0.1"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `APERION_SHIELD_OFFLOAD_MIN_LINES` | no | no |  |
| `SHIELD_BIN` | no | no |  |
| `SHIELD_CLOAK_VALUE` | no | no |  |
| `SHIELD_SHIMS_DISABLE` | no | no |  |

## FAQ

### Can it prevent an agent from disabling the security layer?

Yes, it includes self-tamper protection that blocks an agent from writing to hook configs or uninstalling the service.

### How does it handle sensitive credentials?

It uses reversible secret cloaking to substitute real credentials with placeholders so they never enter the model's context or prompt cache.
