agent-sec — Claude Code MCP server: what it does, how to install
MCP server with 15 security rules for AI agents, each citing OWASP, CWE or EU AI Act. Works over one URL, no install required.
Apache-2.0 ★ 1 updated 2026-07-31
claude mcp add --transport http agent-sec https://agentsec.kernora.ai/mcpWhat agent-sec 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.
What it helps with
- 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 for the agent
- Show all agent-sec rules
- Check the command
curl -s script.sh | bashagainst the security baseline - Run
/agentsec-reportfor the last week
How to install agent-sec
Platform CLI: remote server
claude mcp add --transport http agent-sec https://agentsec.kernora.ai/mcpPlatform CLI: remote server
codex mcp add agent-sec --url https://agentsec.kernora.ai/mcpConfig file
{
"mcpServers": {
"agent-sec": {
"url": "https://agentsec.kernora.ai/mcp"
}
}
}Config file
{
"servers": {
"agent-sec": {
"type": "http",
"url": "https://agentsec.kernora.ai/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http agent-sec https://agentsec.kernora.ai/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-sec
How to install agent-sec in Claude Code?
Run claude mcp add --transport http agent-sec https://agentsec.kernora.ai/mcp.
What does agent-sec do?
Gives the agent 15 security rules citing OWASP, CWE and EU AI Act over MCP. The agent can check a command with the check_action tool and get matching rules. No blocking — advisory only.
What gets sent to the agent-sec server?
The get_security_baseline tool sends nothing. The check_action tool sends only the command text you pass — files, environment and repo content stay local.