@agentguardsco/claude-plugin
v0.2.29
Published
LLM security guardrails for Claude Code — jailbreak detection, prompt-injection and web-content scanning, data-exfiltration blocking, and destructive-command authorization. Bundles the AgentGuards MCP server plus enforcing hooks.
Maintainers
Readme
AgentGuards plugin for Claude Code
LLM security guardrails for Claude Code in one install: jailbreak and prompt-injection detection, web-content scanning, data-exfiltration blocking, and destructive-command authorization.
Enforcement is configurable: fail-closed by default for strict security, or
switch to fail-open (availability-first) with a single environment variable
(AGENTGUARDS_FAIL_OPEN=true).
This plugin bundles:
- the AgentGuards MCP server (
check_input,authorize_action,validate_output,evaluate_policy,health_check), - enforcing hooks —
UserPromptSubmitinput scanning,PreToolUseBash authorization, andPostToolUseweb-content scanning/redaction, - the AgentGuards security instructions (the
guardrailsskill).
Install
/plugin marketplace add alelaguard/agentguards-plugins
/plugin install agentguards-claude@agentguardsThen provide your API key (get one at https://agentguards.co/dashboard/keys) so both the MCP server and the hooks can authenticate:
export AGENTGUARDS_API_KEY=ag_your_token_hereAdd that line to your shell profile (~/.bashrc, ~/.zshrc, …) and restart
Claude Code. Or just run /agentguards:setup and it will walk you through it.
No shell profile? (Claude Desktop's Code tab, or any GUI-launched session
that doesn't read ~/.bashrc.) Set it in ~/.claude/settings.json instead —
this feeds both the hooks and the MCP server, exactly like a shell export:
{
"env": {
"AGENTGUARDS_API_KEY": "ag_your_token_here"
}
}The plugin's Configure screen also accepts a key, but it is only a fallback for the hooks — the bundled MCP server reads the environment variable. Prefer one of the two options above so both halves authenticate.
Claude Desktop's Chat and Cowork tabs are not supported. They sync from
your claude.ai account rather than ~/.claude, so there is no environment for
the key to come from, and hooks do not run in Chat. Use the Code tab.
Alternative: npm install @agentguardsco/claude-plugin. Fetches these same
files for programmatic use (pinned versions, CI, custom tooling) — it does
not register with Claude Code on its own; use /plugin install above for that.
Commands
/agentguards:setup— set your API key and verify everything is wired up./agentguards:status— report whether the guardrails are active and healthy.
Configuration
| Variable | Required | Default | Purpose |
|---|---|---|---|
| AGENTGUARDS_API_KEY | yes | — | Your ag_ token. Drives both the MCP header and the hooks. |
| AGENTGUARDS_URL | no | https://prod.agentguards.co | Override only for a self-hosted instance. |
| AGENTGUARDS_FAIL_OPEN | no | false | Hooks fail closed by default (block when the service is unreachable). Set true to allow on error. |
How it works
The hooks call the AgentGuards REST API on every prompt, before every Bash
command, and after every web fetch — blocking or redacting when AgentGuards
flags a risk. The MCP tools let Claude cooperatively check inputs and authorize
actions as described in the bundled guardrails skill.
Learn more at https://agentguards.co.
