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.
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
- Split access into scopes that match how people think about it, for example
orders:read,orders:write,shipments:read. - Publish only the low-risk read scopes up front.
- When a write tool is first used, answer with a
401or403whoseWWW-Authenticateheader names the extra scope, for exampleBearer error="insufficient_scope", scope="orders:write". The spec's recommended approach is to include the scopes for the current operation plus closely related ones. - 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.
- Remove
*,alland 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.
Related fixes
- Add Client ID Metadata Documents (CIMD) next to Dynamic Client Registration
- API key or token in the MCP server URL (?key=): why it fails and how to fix
- ChatGPT MCP: dynamic client registration not supported (CIMD or DCR required)
- Claude says "Couldn't reach the MCP server": missing protected resource metadata