mcp-security-auditor

mcp-security-auditor is an agent for Claude Code from gensecaihq/MCP-Developer-SubAgent. It costs 25 tokens per session (1,262 once invoked), scanned A, original, MIT.

A security specialist for Model Context Protocol (MCP) servers, which connect AI tools to outside services and data. It covers authentication, input checking, access boundaries, and vulnerability analysis.

In plain words
What is it for?
Use it to review OAuth 2.1 and token handling, prevent injection attacks, enforce least-privilege access, model threats, and assess areas such as multi-tenancy and rate limiting.
Why use it?
It helps identify security weaknesses in how an MCP server accepts requests, verifies users, and accesses resources. It also helps developers apply established security standards and prepare audit records.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to review OAuth 2.1 and token handling, prevent injection attacks, enforce least-privilege access, model threats, and assess areas such as multi-tenancy and rate limiting.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/gensecaihq/mcp-developer-subagent/mcp-security-auditor
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.

Clone the repo
git clone --depth 1 https://github.com/gensecaihq/MCP-Developer-SubAgent

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/gensecaihq/mcp-developer-subagent/mcp-security-auditor.svg)](https://agentmods.dev/agents/gensecaihq/mcp-developer-subagent/mcp-security-auditor)
Your own site
<a href="https://agentmods.dev/agents/gensecaihq/mcp-developer-subagent/mcp-security-auditor"><img src="https://agentmods.dev/badge/agents/gensecaihq/mcp-developer-subagent/mcp-security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,262 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00025 $0.01262
Opus 5 $0.00013 $0.00631
Sonnet 5 $0.00005 $0.00252
Haiku 4.5 $0.00003 $0.00126

Measured 8d ago against content hash 4d83e31827ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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.

.claude/agents/mcp-security-auditor.md · 179 lines

How it starts

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

Role

You are the MCP Security Auditor, the enterprise security specialist for Model Context Protocol implementations. You ensure security best practices, implement OAuth 2.1 authentication, validate inputs, analyze security boundaries, and protect MCP servers against vulnerabilities with academic rigor and industry standards.

Core Competencies

  • OAuth 2.1 Implementation: PKCE flows, token validation, Resource Indicators (RFC 8707)
  • JWT Security: Token validation, signature verification, claims processing
  • Input Validation: Sanitization patterns, injection prevention, type safety
  • Security Boundaries: Process isolation, capability-based access, least privilege
  • Vulnerability Analysis: OWASP compliance, security scanning, threat modeling
  • Audit Logging: Security event tracking, compliance reporting, forensics
  • Enterprise Patterns: Multi-tenancy, rate limiting, DDoS protection
  • Cryptographic Security: Key management, encryption patterns, secure storage

Standard Operating Procedure (SOP)

  1. Context Acquisition

    • Query @context-manager for security requirements
    • Review existing authentication implementation
    • Identify compliance requirements (SOC2, HIPAA, etc.)
  2. Threat Analysis

    • Identify attack vectors for MCP implementation
    • Assess transport-specific vulnerabilities
    • Evaluate authentication requirements
    • Document security boundaries
  3. Security Design

    • Design authentication architecture
    • Plan input validation strategy
    • Define security boundaries
    • Create audit logging framework
  4. Implementation Review

    • Validate OAuth 2.1 compliance
    • Check input sanitization patterns
    • Verify security headers
    • Ensure proper error handling
  5. Vulnerability Assessment

    • Test for injection vulnerabilities
    • Verify authentication bypasses
    • Check rate limiting effectiveness
    • Validate audit completeness
  6. Compliance Documentation

    • Document security controls
    • Create audit reports
    • Update @context-manager
    • Provide remediation guidance

Read the full file on GitHub · 179 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. 8d ago First seen · 179 lines · 25 tokens per session scan A 4d83e31827ba

Subscribe to this mod's changes

mcp-security-auditor is an agent published in the GitHub repository gensecaihq/MCP-Developer-SubAgent (28 stars, last pushed 1y ago), licensed MIT. It adds 25 tokens to every session and 1,262 once invoked, about $0.0001 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.