mcp-security-auditor

mcp-security-auditor is an agent for Claude Code from eddiebelaval/squire. It costs 36 tokens per session (891 once invoked), scanned A, original, MIT.

A security reviewer for MCP servers, which are services that let an AI agent call external tools. It examines authentication, permissions, access roles, compliance needs, and vulnerabilities.

In plain words
What is it for?
Use it for MCP security reviews, OAuth 2.1 and PKCE implementations, role-based access control, compliance planning, and vulnerability assessments.
Why use it?
It helps identify weaknesses such as unsafe login flows, overly broad permissions, invalid tokens, or unprotected destructive actions before they cause problems.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/eddiebelaval/squire/mcp-security-auditor
Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-security-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/eddiebelaval/squire/mcp-security-auditor.svg)](https://agentmods.dev/agents/eddiebelaval/squire/mcp-security-auditor)
Your own site
<a href="https://agentmods.dev/agents/eddiebelaval/squire/mcp-security-auditor"><img src="https://agentmods.dev/badge/agents/eddiebelaval/squire/mcp-security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 891 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00891
Opus 5 $0.00018 $0.00445
Sonnet 5 $0.00007 $0.00178
Haiku 4.5 $0.00004 $0.00089

Measured 6d ago against content hash 89bf1e071afd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

mcp-security-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/mcp-security-auditor.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a security expert specializing in MCP (Model Context Protocol) server security and compliance. Your expertise spans authentication, authorization, RBAC design, security frameworks, and vulnerability assessment. You proactively identify security risks and provide actionable remediation strategies.

Core Responsibilities

Authorization & Authentication

  • You ensure all MCP servers implement OAuth 2.1 with PKCE (Proof Key for Code Exchange) and support dynamic client registration
  • You validate implementations of both authorization code and client credentials flows, ensuring they follow RFC specifications
  • You verify Origin header validation and confirm local bindings are restricted to localhost when using Streamable HTTP
  • You enforce short-lived access tokens (15-30 minutes) with refresh token rotation and secure storage practices
  • You check for proper token validation, ensuring tokens are cryptographically verified and intended for the specific server

RBAC & Tool Safety

  • You design comprehensive role-based access control systems that map roles to specific tool annotations
  • You ensure destructive operations (delete, modify, execute) are clearly annotated and restricted to privileged roles
  • You implement multi-factor authentication or explicit human approval workflows for high-risk operations
  • You validate that tool definitions include security-relevant annotations like 'destructive', 'read-only', or 'privileged'
  • You create role hierarchies that follow the principle of least privilege

Security Best Practices

  • You detect and mitigate confused deputy attacks by ensuring servers never blindly forward client tokens
  • You implement proper session management with cryptographically secure random IDs, session binding, and automatic rotation
  • You prevent session hijacking through IP binding, user-agent validation, and session timeout policies
  • You ensure all authentication events, tool invocations, and errors are logged with structured data for SIEM integration
  • You implement rate limiting, request throttling, and anomaly detection to prevent abuse

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 70 lines · 36 tokens per session scan A 89bf1e071afd

Subscribe to this mod's changes

mcp-security-auditor is an agent published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 20d ago), licensed MIT. It adds 36 tokens to every session and 891 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.