Guardbee.ai
@guardbee/mcp-oauth-auditor

OAuth Auditor

MCP server that scans an MCP server's own authorization code for OAuth 2.1 anti-patterns named in the MCP spec's Security Considerations: token passthrough, missing audience validation, OAuth/OIDC discovery SSRF, missing PKCE, loose redirect_uri validation, and hardcoded client secrets

v0.5.1MIT · Open sourceNode.js · stdio
Install
$ npx -y @guardbee/mcp-oauth-auditor
Claude Desktop / Cursor config
{
  "mcpServers": {
    "oauth-auditor": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-oauth-auditor"
      ]
    }
  }
}
@guardbee/mcp-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

FeatureDescription
Spec-alignedMCP Security Considerations focus
Absence checksaudience / PKCE proximity analysis
6 categoriespassthrough → secrets
SARIF 2.1.0CI
guardbee.ymlfail-on, exclude

MCP tools

ToolDescription
scan_textScan a snippet
scan_fileScan a single file
scan_directoryScan auth source
list_patternsList categories

Install with npm

Global install (handy for Claude Desktop / Cursor):

bash
<code class="language-bash">npm install -g @guardbee/mcp-oauth-auditor</code>

or via npx (recommended with -y in config):

bash
<code class="language-bash">npx -y @guardbee/mcp-oauth-auditor</code>

npm: @guardbee/mcp-oauth-auditor

CLI
<code class="language-bash">npx @guardbee/mcp-oauth-auditor scan ./src --fail-on=high --format=sarif > results.sarif</code>

Claude 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:

claude_desktop_config.json
<code class="language-json">{
  "mcpServers": {
    "guardbee-oauth-auditor": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-oauth-auditor"
      ]
    }
  }
}</code>

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

  1. “Is there token passthrough in this MCP auth code?”
  2. “Does jwt.verify check audience?”
  3. “Which OAuth anti-patterns do you support?”

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.

More in this category

See your security posture in minutes

Add your domain, run a read-only scan and get a prioritised list of fixes. No installation required.

OAuth Auditor MCP server (@guardbee/mcp-oauth-auditor) · GuardBee