MCP Shipyard
← Rules catalog

Wildcard OAuth scopes on an MCP server: publish narrow scopes instead

Scopes like *, all, full-access or admin:* hand every token full access. Publish narrow scopes and step up with a WWW-Authenticate scope challenge.

minorauth.scopes-omnibusGeneral

Advertise narrow, operation-sized scopes in scopes_supported. The rule auth.scopes-omnibus is a minor finding for OAuth servers. It warns when protected resource or authorization server metadata lists scopes such as *, all, full-access, admin, root, *:*, or any name:* or name.* pattern.

What you see

  • A scan reports Broad scopes advertised: ... with up to five names.
  • Users see a consent screen asking for everything, and a stolen token can do everything.

Why it happens

The MCP security best practices page explains the mechanism. When the first WWW-Authenticate challenge carries no scope parameter, clients fall back to requesting every scope in scopes_supported. Claude's authentication page confirms its client does this: "If you don't, Claude requests the scopes your protected resource metadata advertises in scopes_supported." OpenAI's page says ChatGPT uses scopes_supported to explain permissions and requests OIDC scopes it finds in metadata by default.

So a single wildcard scope in the list becomes a wildcard grant.

Check it yourself

curl -s https://mcp.acme.example/.well-known/oauth-protected-resource | jq .scopes_supported
curl -s https://auth.acme.example/.well-known/oauth-authorization-server | jq .scopes_supported

Fix

  1. Split access into scopes that match how people think about it, for example orders:read, orders:write, shipments:read.
  2. Publish only the low-risk read scopes up front.
  3. When a write tool is first used, answer with a 401 or 403 whose WWW-Authenticate header names the extra scope, for example Bearer error="insufficient_scope", scope="orders:write". The spec's recommended approach is to include the scopes for the current operation plus closely related ones.
  4. Accept tokens with fewer scopes than requested and enforce scopes per tool on the server. The spec lists "treating claimed scopes in token as sufficient without server-side authorization logic" as a common mistake.
  5. Remove *, all and similar from every metadata document.

Verify

Re-run the two curl commands and confirm no wildcard remains. Connect from a client and confirm the consent screen lists only the narrow scopes. Re-scan.

Which clients care

General, per the rule. The guidance comes from the MCP spec and applies to any client that reads scopes_supported.

Source

MCP security best practices (scope minimization): https://modelcontextprotocol.io/specification/2026-07-28/basic/security_best_practices

Claude authentication docs: https://claude.com/docs/connectors/building/authentication

Run a free scan at https://mcpshipyard.com/scan to check every rule at once.

Check every rule at once

A free scan runs this check and the other 152 against your live URL.

Scan a server