MCP guide · OAuth Auditor

@guardbee/mcp-oauth-auditor scans for the OAuth 2.1 anti-patterns named in the MCP spec’s Security Considerations — especially token passthrough and missing audience validation.
What does it do?
Six categories: token-passthrough, token-validation (missing audience), discovery-ssrf, pkce, redirect-validation, secrets-exposure. Some rules look for an absence near a call site (audience / code_challenge).
Who is it for?
- Teams building MCP servers / OAuth resource servers
- DevSecOps reviewing OAuth/OIDC on every PR
- Developers who want this check inside Claude or Cursor
What it is not
- Generic web-app API-key scanning (use Secret Scanner)
- Live token abuse / red team (different from LLM Red Team)
- A formal OAuth certification
Features
| Feature | Description |
|---|---|
| Spec-aligned | MCP Security Considerations focus |
| Absence checks | audience / PKCE proximity analysis |
| 6 categories | passthrough → secrets |
| SARIF 2.1.0 | CI |
| guardbee.yml | fail-on, exclude |
MCP tools
| Tool | Description |
|---|---|
scan_text | Scan a snippet |
scan_file | Scan a single file |
scan_directory | Scan auth source |
list_patterns | List categories |
Install with npm
Global install (handy for Claude Desktop / Cursor):
npm install -g @guardbee/mcp-oauth-auditoror via npx (recommended with -y in config):
npx -y @guardbee/mcp-oauth-auditornpx @guardbee/mcp-oauth-auditor scan ./src --fail-on=high --format=sarif > results.sarifClaude Desktop configuration
Config file paths:
- macOS
~/Library/Application Support/Claude/claude_desktop_config.json - Windows
%APPDATA%\Claude\claude_desktop_config.json - Linux
~/.config/Claude/claude_desktop_config.json
Merge this block, then restart Claude Desktop:
{
"mcpServers": {
"guardbee-oauth-auditor": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-oauth-auditor"
]
}
}
}Cursor and other MCP clients
In Cursor, add the same command / args / env under Settings → MCP. stdio MCP servers use the same contract as Claude Desktop.
Example prompts in Claude
- “Is there token passthrough in this MCP auth code?”
- “Does jwt.verify check audience?”
- “Which OAuth anti-patterns do you support?”
Related links
See surface risk with Guardbee
MCP servers speed up security work in chat. Start a 14-day free trial for brand scans and BeeAI.
Frequently asked questions
Why MCP-specific?
The MCP spec explicitly names token passthrough and audience as resource-server risks.
API key?
No — local source scanning.
Is PKCE always required?
OAuth 2.1 expects it on authorization requests; absence is flagged.