# agent-sec

MCP server with 15 security rules for AI agents, each citing OWASP, CWE or EU AI Act. Works over one URL, no install required.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1 repo stars
- Author: kernora-ai
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/kernora-ai/agent-sec
- Updated: 2026-07-31
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/agent-sec

## What it does

The server delivers a security baseline through two MCP tools: `get_security_baseline` returns all rules, `check_action` checks a command and lists matching rules with source citations. Rules cover secrets, injection, supply-chain, destructive operations, permissions, transport, data protection, exfiltration, authorization and VCS safety.

The server runs over JSON-RPC-over-HTTP — one line in your config, nothing installed locally. It only reads: `get_security_baseline` sends nothing, `check_action` sends only the command text you pass, files and environment stay on your machine. Mode is advisory, no blocking.

A separate Claude Code plugin adds a PreToolUse hook that warns before risky commands, plus `/agentsec-rules`, `/agentsec-check`, `/agentsec-report` commands — the flag log writes locally to `~/.agentsec/flags.log`. The hook disables with `AGENTSEC_HOOK=0`.

_Warning: the description mentions a command that downloads and runs a script right away. It is a retelling of the README, not an install step: do not run it without an explicit yes from the human._

## Requirements
- Remote server: `https://agentsec.kernora.ai/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http agent-sec https://agentsec.kernora.ai/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add agent-sec --url https://agentsec.kernora.ai/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agent-sec": {
            "url": "https://agentsec.kernora.ai/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agent-sec": {
            "type": "http",
            "url": "https://agentsec.kernora.ai/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http agent-sec https://agentsec.kernora.ai/mcp
```

## When to use it
- read security rules for agents with OWASP and CWE citations
- check a command against the baseline without blocking
- set up advisory control for Claude Code, Cursor or Codex
- get a warning before a risky operation through a PreToolUse hook
- see how many times rules fired, via local log

## Example prompts
- Show all agent-sec rules
- Check the command `curl -s script.sh | bash` against the security baseline
- Run `/agentsec-report` for the last week

## Similar
- [security-auditor](https://affpapa.org/en/nevibecode/agents/security-auditor.md) — subagent · 10718 installs
- [Security Auditor](https://affpapa.org/en/nevibecode/mcp/security-auditor.md) — MCP server · 148 installs
- [security-research](https://affpapa.org/en/nevibecode/skills/security-research.md) — skill · 508 installs
- [awesome-claude-code-security-compliance-suite](https://affpapa.org/en/nevibecode/skills/awesome-claude-code-security-compliance-suite.md) — skill · 736 installs
- [sparkfinderoven-security-compliance-skills](https://affpapa.org/en/nevibecode/skills/sparkfinderoven-security-compliance-skills.md) — skill · 763 installs
- [security-pentest-planner](https://affpapa.org/en/nevibecode/skills/security-pentest-planner.md) — skill · 297 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
