# Shield Kya

> Shield Kya is an open-source MCP server for security. Audit trail and policy gate for coding agents: allow, review or deny each tool call. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, macOS, Linux, Windows
- **Repository:** https://github.com/the-pixel-boys/shield-kya
- **MCP Registry name:** io.github.The-Pixel-Boys/shield-kya
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Most of the README is about what runs locally. After one command, kya start wires MCP config for Claude Code, Cursor and other hosts it detects, and opens a local dashboard recording every tool call. Local hooks fail open: they record everything and block only a short never-list of destructive commands, secret reads and exfiltration. Real blocking and human approval run through the MCP policy path against a hosted Shield workspace, where an agent that asks gets Allow, Review or Deny.

The CLI exit codes are deliberate: eval-tool, wrap and invoke return 0 on allow, 4 on require-approve and 1 on deny or unknown, so a chained command cannot skip the gate. An offline mode lets you try demo denials without a paid cloud. It never auto-approves an irreversible side effect, and agents that never call evaluate stay invisible because it does not scan your network.

It needs Node.js 22 or newer, with KYA_BASE_URL and KYA_API_KEY for a control plane. It is MIT licensed and also ships plugins for Claude Code, Codex and Gemini CLI, a GitHub Action, a VS Code extension, Homebrew and Scoop.

## Features

- **Local activity report:** Records each tool call on a local dashboard.
- **Default never-list:** Denies a short list of destructive commands, secret reads and exfiltration.
- **Allow, review, deny:** Policy decisions through a hosted control plane.
- **Human approval:** Review decisions wait for a person.
- **Exit-code gating:** Codes 0, 4 and 1 stop chained commands from bypassing the gate.
- **Many host plugins:** Plugins and wiring for Claude Code, Codex, Gemini CLI and Cursor.

## Good for

- See what a coding agent did in a session
- Block secret reads and destructive commands
- Require approval for risky tool calls
- Fail CI when an agent action is denied
- Try policy decisions offline

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add shield-kya --env KYA_BASE_URL='<KYA_BASE_URL>' --env KYA_API_KEY='<KYA_API_KEY>' -- npx -y @shield-agent/kya
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add shield-kya --env KYA_BASE_URL='<KYA_BASE_URL>' --env KYA_API_KEY='<KYA_API_KEY>' -- npx -y @shield-agent/kya
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.shield-kya]
command = "npx"
args = ["-y", "@shield-agent/kya"]
env = { KYA_BASE_URL = "<KYA_BASE_URL>", KYA_API_KEY = "<KYA_API_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e KYA_BASE_URL='<KYA_BASE_URL>' -e KYA_API_KEY='<KYA_API_KEY>' shield-kya npx -- -y @shield-agent/kya

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "shield-kya": {
      "command": "npx",
      "args": [
        "-y",
        "@shield-agent/kya"
      ],
      "env": {
        "KYA_BASE_URL": "<KYA_BASE_URL>",
        "KYA_API_KEY": "<KYA_API_KEY>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `kya.agent.register`: Registers an agent; offline it returns REQUIRE_APPROVE.

## FAQ

### Does Shield Kya block anything on its own?

Local hooks block only the default never-list; full enforcement uses the hosted workspace.

### What are the requirements?

Node.js 22 or newer, 24 recommended.

### Is Shield Kya free?

The README says free forever under MIT.

### Does Shield Kya scan my network?

No. Agents that never call evaluate stay invisible.

### How do I add Shield Kya to Claude Code?

Run this command in your terminal: claude mcp add shield-kya --env KYA_BASE_URL='<KYA_BASE_URL>' --env KYA_API_KEY='<KYA_API_KEY>' -- npx -y @shield-agent/kya

### What are the best alternatives to Shield Kya?

The closest alternatives to Shield Kya are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/shield-kya
