← Blog’a dön

← Back to blog

MCP OAuth Auditor: token passthrough & audience risks

,

MCP guide · OAuth Auditor

MCP OAuth Auditor: token passthrough & audience risks
@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
npm install -g @guardbee/mcp-oauth-auditor

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

bash
npx -y @guardbee/mcp-oauth-auditor

npm: @guardbee/mcp-oauth-auditor

CLI
npx @guardbee/mcp-oauth-auditor scan ./src --fail-on=high --format=sarif > results.sarif

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
{
  "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

  1. “Is there token passthrough in this MCP auth code?”
  2. “Does jwt.verify check audience?”
  3. “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.

Start free MCP servers

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.

Paylaş

Share

Sitenizin risk skorunu görün — 14 gün ücretsiz deneme.

See your site’s risk score — 14-day free trial.