# Shield MCP server

> Wrap any MCP server with per-tool permission enforcement, replay protection, and audit receipts without changing server code.

- Repository: https://github.com/bolyra/bolyra
- Page: https://hostedmcp.org/servers/bolyra/shield
- Transport: stdio
- Stars: 0
- License: Apache-2.0
- Latest version: 0.1.0

## Install

### Claude Code

```sh
claude mcp add shield -- npx -y @bolyra/shield
```

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

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

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

```json
{
  "servers": {
    "shield": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@bolyra/shield"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"shield","type":"stdio","command":"npx","args":["-y","@bolyra/shield"]}'
```

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

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

### Codex

```sh
codex mcp add shield -- npx -y @bolyra/shield
```

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

```toml
[mcp_servers.shield]
command = "npx"
args = ["-y", "@bolyra/shield"]
```

### Gemini CLI

```sh
gemini mcp add -s user shield npx -- -y @bolyra/shield
```

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

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

## FAQ

### Do I need to change my existing MCP server code to use Shield?

No, Shield acts as a proxy that wraps your existing server with no code changes required.

### What happens if a tool is not explicitly listed in the configuration?

By default, tools without a policy entry are allowed. However, you can set defaultDeny to true to reject any tool not listed in the configuration.

### Where are the audit receipts sent?

Audit receipts are emitted to stderr, as stdout is reserved for the MCP transport.
