oauth-auditor

v0.5.1
io.github.GuardBee/oauth-auditor Checked 6 hours ago Published 1 month ago

Scans MCP server auth code for OAuth 2.1 anti-patterns: token passthrough, missing audience

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scan_text

Scan an MCP server's authorization code for OAuth 2.1 anti-patterns named in the MCP spec's own Security Considerations: token passthrough (forwarding a client's token to a downstream API unchanged), missing audience validation on JWT verification, OAuth/OIDC discovery SSRF, missing PKCE, loose redirect_uri validation, and hardcoded client secrets.

ParameterTypeDescription
content *stringThe code content to scan
labelstringOptional label shown in findings (e.g. filename)

scan_file

Scan a single file for OAuth/token-handling anti-patterns

ParameterTypeDescription
path *stringAbsolute or relative path to the file to scan

scan_directory

Recursively scan a directory of MCP server source for OAuth/token-handling anti-patterns

ParameterTypeDescription
path *stringAbsolute or relative path to the directory to scan
excludearraySkip files/dirs whose path contains one of these strings
includearrayOnly scan files whose path contains one of these strings
maxFilesintegerMaximum number of files to scan (default: 5000)

list_patterns

List every OAuth/token-handling pattern this auditor detects, grouped by category