Skip to content

AAK-MCP-018: Missing rate limiting on MCP endpoint

Severity
MEDIUM
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_auth_patterns.py
Auto-fixable
No.
SARIF name
McpNoRateLimit

What it detects

An MCP server endpoint does not declare rate limiting. Unrestricted access allows credential stuffing and enumeration attacks.

How to fix

Add per-IP and per-token rate limits to the server that declares the /mcp route, and answer bursts with 429. This check looks for ratelimit, rate_limit, throttle or limiter in the same file as the route, so a limit enforced only at a gateway or reverse proxy is not seen; in that case accept the finding under exclude-rules in .agent-audit-kit.yml.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-018

Limitations

Fires on a file that names an MCP server class and contains the text /mcp but none of the words ratelimit, rate_limit, throttle or limiter. A server that never writes /mcp is not examined, and the word in a comment (# TODO: add rate_limit middleware) counts as rate limiting.

References

  • OWASP MCP Top 10: MCP07:2025 (Insufficient Authentication & Authorization)
  • OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-DOS-02

All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-018.md: the page then shows that text, with the registry reference appended under it.