oauth-auditor
v0.5.1Scans 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.
| Parameter | Type | Description |
|---|---|---|
content * | string | The code content to scan |
label | string | Optional label shown in findings (e.g. filename) |
scan_file
Scan a single file for OAuth/token-handling anti-patterns
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute or relative path to the file to scan |
scan_directory
Recursively scan a directory of MCP server source for OAuth/token-handling anti-patterns
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute or relative path to the directory to scan |
exclude | array | Skip files/dirs whose path contains one of these strings |
include | array | Only scan files whose path contains one of these strings |
maxFiles | integer | Maximum number of files to scan (default: 5000) |
list_patterns
List every OAuth/token-handling pattern this auditor detects, grouped by category